diff --git a/app/js/directives.js b/app/js/directives.js index 383ab54b..bdbb1194 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -180,6 +180,7 @@ angular.module('myApp.directives', ['myApp.filters']) var messageMediaCompiled = $compile('
'); var messageKeyboardCompiled = $compile('
'); + var messageSignCompiled = $compile('
'); return { link: link, @@ -231,6 +232,19 @@ angular.module('myApp.directives', ['myApp.filters']) }); } + function updateMessageSignature($scope, element, message) { + if (!message.signID) { + $('.im_message_sign', element).hide(); + return; + } + + var scope = $scope.$new(true); + scope.signID = message.signID; + messageSignCompiled(scope, function (clonedElement) { + $('.im_message_sign', element).replaceWith(clonedElement); + }); + } + function updateMessageKeyboard($scope, element, message) { if (!message.reply_markup || message.reply_markup._ != 'replyInlineMarkup') { @@ -260,6 +274,7 @@ angular.module('myApp.directives', ['myApp.filters']) function updateMessageBody($scope, element, message) { updateMessageText($scope, element, message); updateMessageMedia($scope, element, message); + updateMessageSignature($scope, element, message); updateMessageKeyboard($scope, element, message); } diff --git a/app/js/messages_manager.js b/app/js/messages_manager.js index 6b767f36..a0a8a5f9 100644 --- a/app/js/messages_manager.js +++ b/app/js/messages_manager.js @@ -1120,6 +1120,7 @@ angular.module('myApp.services') apiMessage.toID = toPeerID; apiMessage.fromID = apiMessage.pFlags.post ? toPeerID : apiMessage.from_id; + apiMessage.signID = apiMessage.pFlags.post && apiMessage.from_id || fwdHeader && fwdHeader.from_id; if (apiMessage.via_bot_id > 0) { apiMessage.viaBotID = apiMessage.via_bot_id; diff --git a/app/less/app.less b/app/less/app.less index 63cf01a8..af501af4 100644 --- a/app/less/app.less +++ b/app/less/app.less @@ -1654,6 +1654,14 @@ div.im_message_video_thumb { font-weight: bold; // margin-right: 4px; } +.im_message_sign { + padding-top: 1px; +} +.im_message_sign_link { + pointer-events: none; + color: #adadad; + font-size: 0.95em; +} .icon-circle { display: none; // display: inline-block; @@ -3888,7 +3896,8 @@ ul.chat_modal_migrate_list { .audio_player_duration, .audio_player_size, .im_message_fwd_date, - .im_message_views_cnt { + .im_message_views_cnt, + .im_message_sign_link { color: #899daf; } diff --git a/app/less/desktop.less b/app/less/desktop.less index 629e1171..5af9b6bb 100644 --- a/app/less/desktop.less +++ b/app/less/desktop.less @@ -902,12 +902,14 @@ a.footer_link.active:active { .im_message_selected .im_message_audio_size, .im_message_selected .im_message_fwd_date, .im_message_selected .im_message_views_cnt, +.im_message_selected .im_message_sign_link, .im_history_select_active .im_message_outer_wrap:hover .im_message_date, .im_history_select_active .im_message_outer_wrap:hover .im_message_document_size, .im_history_select_active .im_message_outer_wrap:hover .im_message_audio_duration, .im_history_select_active .im_message_outer_wrap:hover .im_message_audio_size, .im_history_select_active .im_message_outer_wrap:hover .im_message_fwd_date, -.im_history_select_active .im_message_outer_wrap:hover .im_message_views_cnt { +.im_history_select_active .im_message_outer_wrap:hover .im_message_views_cnt, +.im_history_select_active .im_message_outer_wrap:hover .im_message_sign_link { color: #899daf; } diff --git a/app/less/mobile.less b/app/less/mobile.less index a626bb4f..5a2df105 100644 --- a/app/less/mobile.less +++ b/app/less/mobile.less @@ -916,6 +916,9 @@ a.im_message_author_via { font-size: 13px; font-weight: normal; } + .im_message_sign_link { + font-size: 12px; + } } .im_grouped_short a.im_message_from_photo, diff --git a/app/partials/desktop/message.html b/app/partials/desktop/message.html index ab3dd2da..ad51c52f 100644 --- a/app/partials/desktop/message.html +++ b/app/partials/desktop/message.html @@ -65,6 +65,7 @@
+
diff --git a/app/partials/mobile/message.html b/app/partials/mobile/message.html index 3b2c059c..25c9948f 100644 --- a/app/partials/mobile/message.html +++ b/app/partials/mobile/message.html @@ -57,6 +57,7 @@
+