diff --git a/app/js/directives.js b/app/js/directives.js index bdbb1194..b3a37f6c 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -296,7 +296,11 @@ angular.module('myApp.directives', ['myApp.filters']) $scope.$on('message_edit', function (e, data) { if (data.mid == message.mid) { - updateMessageBody($scope, element, message); + if (data.justMedia) { + updateMessageMedia($scope, element, message); + } else { + updateMessageBody($scope, element, message); + } } }); } diff --git a/app/js/messages_manager.js b/app/js/messages_manager.js index 04841434..18065f9f 100644 --- a/app/js/messages_manager.js +++ b/app/js/messages_manager.js @@ -3081,6 +3081,12 @@ angular.module('myApp.services') _: 'messageMediaWebPage', webpage: AppWebPagesManager.wrapForHistory(eventData.id) }; + $rootScope.$broadcast('message_edit', { + peerID: getMessagePeer(historyMessage), + id: historyMessage.id, + mid: msgID, + justMedia: true + }); } }) });