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) {