From 7e2b65d526e3396aa9336da6db3499c0214385d7 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 8 Apr 2014 21:55:00 +0200 Subject: [PATCH] Fix #46, desktop part - added Notification tag --- app/js/services.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index 86d0df3f..44fc373f 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -1677,6 +1677,7 @@ angular.module('myApp.services', []) notification.message = notificationMessage; notification.image = notificationPhoto.placeholder; notification.key = 'msg' + message.id; + notification.tag = peerString; if (notificationPhoto.location && !notificationPhoto.location.empty) { MtpApiFileManager.downloadSmallFile(notificationPhoto.location, notificationPhoto.size).then(function (url) { @@ -2020,9 +2021,10 @@ angular.module('myApp.services', []) return photo; } - function openPhoto (photoID, accessHash) { + function openPhoto (photoID, messageID) { var scope = $rootScope.$new(true); scope.photoID = photoID; + scope.messageID = messageID; var modalInstance = $modal.open({ templateUrl: 'partials/photo_modal.html', @@ -3029,7 +3031,8 @@ angular.module('myApp.services', []) var notification = new Notification(data.title, { icon: data.image || '', - body: data.message || '' + body: data.message || '', + tag: data.tag || '' }); notification.onclick = function () {