diff --git a/app/js/directives.js b/app/js/directives.js index 8bffa52a..2fccf18b 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -451,7 +451,7 @@ angular.module('myApp.directives', ['myApp.filters']) }) - .directive('myMessageText', function(AppPeersManager, AppMessagesManager, AppUsersManager, RichTextProcessor) { + .directive('myMessageText', function(AppPeersManager, AppMessagesManager, AppChatsManager, AppUsersManager, RichTextProcessor) { return { link: link, scope: { @@ -465,7 +465,7 @@ angular.module('myApp.directives', ['myApp.filters']) var fromBot = fromUser && fromUser.pFlags.bot && fromUser.username || false; var toPeerID = AppPeersManager.getPeerID(message.to_id); var withBot = (fromBot || - toPeerID < 0 || + toPeerID < 0 && !(AppChatsManager.isChannel(-toPeerID) && !AppChatsManager.isMegagroup(-toPeerID)) || toPeerID > 0 && AppUsersManager.isBot(toPeerID)); var options = { diff --git a/app/js/lib/mtproto_wrapper.js b/app/js/lib/mtproto_wrapper.js index 9dba4653..f855b200 100644 --- a/app/js/lib/mtproto_wrapper.js +++ b/app/js/lib/mtproto_wrapper.js @@ -487,14 +487,14 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) } } - console.log(dT(), 'Dload file', dcID, location, size); + // console.log(dT(), 'Dload file', dcID, location, size); var fileName = getFileName(location), toFileEntry = options.toFileEntry || null, cachedPromise = cachedSavePromises[fileName] || cachedDownloadPromises[fileName]; var fileStorage = getFileStorage(); - console.log(dT(), 'fs', fileStorage.name, fileName, cachedPromise); + // console.log(dT(), 'fs', fileStorage.name, fileName, cachedPromise); if (cachedPromise) { if (toFileEntry) { @@ -520,9 +520,7 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) }; - console.log(dT(), 'fs get file', fileName, size); fileStorage.getFile(fileName, size).then(function (blob) { - console.log(dT(), 'fs got file', fileName, size); if (toFileEntry) { FileManager.copy(blob, toFileEntry).then(function () { deferred.resolve(); @@ -531,7 +529,6 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) deferred.resolve(cachedDownloads[fileName] = blob); } }, function () { - console.log(dT(), 'fs fail file', fileName, size); var fileWriterPromise = toFileEntry ? FileManager.getFileWriter(toFileEntry) : fileStorage.getFileWriter(fileName, mimeType); var processDownloaded = function (bytes) {