Fixed deleted message reply

This commit is contained in:
Igor Zhukov 2015-03-30 21:41:00 +03:00
parent 060d735ac4
commit 05c18f077f
2 changed files with 9 additions and 1 deletions

View File

@ -356,6 +356,10 @@ angular.module('myApp.directives', ['myApp.filters'])
function updateMessage($scope, element) {
var message = $scope.replyMessage;
if (!message || message.deleted || !message.to_id) {
$(element).remove();
return;
}
var thumbWidth = 42;
var thumbHeight = 42;
var thumbPhotoSize;

View File

@ -1943,7 +1943,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
return messagesForDialogs[msgID];
}
var message = angular.copy(messagesStorage[msgID]) || {id: msgID};
var message = angular.copy(messagesStorage[msgID]);
if (!message || !message.to_id) {
return message;
}
if (message.chatID = message.to_id.chat_id) {
message.peerID = -message.chatID;