From 5268f5b14d121f796c3149b66942e3fde95a724e Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 7 Dec 2015 18:42:38 +0300 Subject: [PATCH] Draft --- app/js/controllers.js | 7 +++++++ app/js/services.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 0e899c11..dd97da29 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -2194,6 +2194,13 @@ angular.module('myApp.controllers', ['myApp.i18n']) function updateCommands () { var peerID = $scope.curDialog.peerID; + if (peerID === undefined) { + console.warn('undefined peerID', $scope.curDialog); + console.trace(); + safeReplaceObject($scope.commands, {}); + $scope.$broadcast('mentions_update'); + return; + } AppProfileManager.getPeerBots(peerID).then(function (peerBots) { if (!peerBots.length) { diff --git a/app/js/services.js b/app/js/services.js index cbdcda25..3ba0d88b 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -1064,7 +1064,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) if (chatFullPromises[id] !== undefined) { return chatFullPromises[id]; } - // console.trace('get chat full'); + console.trace(dT(), 'Get chat full', id, AppChatsManager.getChat(id)); return chatFullPromises[id] = MtpApiManager.invokeApi('messages.getFullChat', { chat_id: AppChatsManager.getChatInput(id) }).then(function (result) {