Browse Source

Fixed deleted message reply

master
Igor Zhukov 10 years ago
parent
commit
05c18f077f
  1. 4
      app/js/directives.js
  2. 6
      app/js/services.js

4
app/js/directives.js

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

6
app/js/services.js

@ -1943,7 +1943,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
return messagesForDialogs[msgID]; 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) { if (message.chatID = message.to_id.chat_id) {
message.peerID = -message.chatID; message.peerID = -message.chatID;

Loading…
Cancel
Save