diff --git a/app/js/message_composer.js b/app/js/message_composer.js
index 6efe38a1..43c5fd0c 100644
--- a/app/js/message_composer.js
+++ b/app/js/message_composer.js
@@ -15,6 +15,7 @@
var emojis = {};
var shortcuts = {};
var spritesheetPositions = {};
+ var stickers = {};
var index = false;
var popular = 'joy,kissing_heart,heart,heart_eyes,blush,grin,+1,relaxed,pensive,smile,sob,kiss,unamused,flushed,stuck_out_tongue_winking_eye,see_no_evil,wink,smiley,cry,stuck_out_tongue_closed_eyes,scream,rage,smirk,disappointed,sweat_smile,kissing_closed_eyes,speak_no_evil,relieved,grinning,yum,laughing,ok_hand,neutral_face,confused'.split(',');
@@ -119,6 +120,7 @@
emojis: emojis,
shortcuts: shortcuts,
spritesheetPositions: spritesheetPositions,
+ stickers: stickers,
getPopularEmoji: getPopularEmoji,
pushPopularEmoji: pushPopularEmoji,
indexEmojis: indexEmojis,
diff --git a/app/js/services.js b/app/js/services.js
index aba62d09..dea2602d 100644
--- a/app/js/services.js
+++ b/app/js/services.js
@@ -1981,6 +1981,10 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
case 'messageMediaDocument':
if (message.media.document.sticker) {
notificationMessage = _('conversation_media_sticker');
+ var stickerEmoji = EmojiHelper.stickers[message.media.document.id];
+ if (stickerEmoji !== undefined) {
+ notificationMessage = RichTextProcessor.wrapPlainText(stickerEmoji) + ' (' + notificationMessage + ')';
+ }
} else {
notificationMessage = message.media.document.file_name || _('conversation_media_document_raw');
}
@@ -2726,7 +2730,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
}
})
-.service('AppDocsManager', function ($sce, $rootScope, $modal, $window, $q, MtpApiFileManager, FileManager) {
+.service('AppDocsManager', function ($sce, $rootScope, $modal, $window, $q, RichTextProcessor, MtpApiFileManager, FileManager) {
var docs = {},
docsForHistory = {},
windowW = $(window).width(),
@@ -2753,7 +2757,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
apiDoc.duration = attribute.duration;
break;
case 'documentAttributeSticker':
- apiDoc.sticker = true;
+ apiDoc.sticker = 1;
+ var stickerEmoji = EmojiHelper.stickers[apiDoc.id];
+ if (stickerEmoji !== undefined) {
+ apiDoc.sticker = 2;
+ apiDoc.stickerEmoji = RichTextProcessor.wrapRichText(stickerEmoji, {noLinks: true, noLinebreaks: true});
+ }
break;
case 'documentAttributeImageSize':
apiDoc.w = attribute.w;
@@ -3067,7 +3076,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
}
function getStickerEmoji(docID) {
- return stickersToEmoji[docID] || false;
+ return EmojiHelper.stickers[docID] || false;
}
function processRawStickers(stickers) {
@@ -3082,7 +3091,6 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
var pack, emoticon, docID;
var doneDocIDs = {};
- stickersToEmoji = {};
currentStickers = [];
len1 = stickers.packs.length;
for (i = 0; i < len1; i++) {
@@ -3091,8 +3099,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
len2 = pack.documents.length;
for (j = 0; j < len2; j++) {
docID = pack.documents[j];
- if (stickersToEmoji[docID] === undefined) {
- stickersToEmoji[docID] = emoticon;
+ if (EmojiHelper.stickers[docID] === undefined) {
+ EmojiHelper.stickers[docID] = emoticon;
}
if (doneDocIDs[docID] === undefined) {
doneDocIDs[docID] = true;
diff --git a/app/partials/desktop/dialog.html b/app/partials/desktop/dialog.html
index 06013c3b..d23efda7 100644
--- a/app/partials/desktop/dialog.html
+++ b/app/partials/desktop/dialog.html
@@ -45,7 +45,11 @@
-
+
+
+
+ ()
+
diff --git a/app/partials/mobile/dialog.html b/app/partials/mobile/dialog.html
index f8bd665f..c9bb0e31 100644
--- a/app/partials/mobile/dialog.html
+++ b/app/partials/mobile/dialog.html
@@ -52,7 +52,11 @@
-
+
+
+
+ ()
+