From e9d6611aa0bba137b7192cc4119c1412dbfa1bf4 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 8 May 2019 14:15:16 -0300 Subject: [PATCH] [FIX] Mentions message missing 'jump to message' action (#14430) * fixed context * threads context --- app/mentions-flextab/client/views/mentionsFlexTab.html | 2 +- app/mentions-flextab/client/views/mentionsFlexTab.js | 3 --- app/threads/client/flextab/thread.html | 2 +- app/ui-message/client/message.js | 8 ++++++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/mentions-flextab/client/views/mentionsFlexTab.html b/app/mentions-flextab/client/views/mentionsFlexTab.html index bf8413811df..3405a79f309 100644 --- a/app/mentions-flextab/client/views/mentionsFlexTab.html +++ b/app/mentions-flextab/client/views/mentionsFlexTab.html @@ -9,7 +9,7 @@
{{#if hasMore}} diff --git a/app/mentions-flextab/client/views/mentionsFlexTab.js b/app/mentions-flextab/client/views/mentionsFlexTab.js index 24268b57ac9..37ae334f143 100644 --- a/app/mentions-flextab/client/views/mentionsFlexTab.js +++ b/app/mentions-flextab/client/views/mentionsFlexTab.js @@ -10,9 +10,6 @@ Template.mentionsFlexTab.helpers({ messages() { return Template.instance().cursor; }, - message() { - return _.extend(this, { customClass: 'mentions', actionContext: 'mentions' }); - }, hasMore() { return Template.instance().hasMore.get(); }, diff --git a/app/threads/client/flextab/thread.html b/app/threads/client/flextab/thread.html index deb2b789c85..e4a438a9b5f 100644 --- a/app/threads/client/flextab/thread.html +++ b/app/threads/client/flextab/thread.html @@ -23,7 +23,7 @@ {{else}} {{> message groupable=false hideRoles=true msg=mainMessage room=room subscription=subscription settings=settings customClass="thread-message" templatePrefix='thread-' customClass="thread-main" u=u}} {{#each msg in messages}} - {{> message hideRoles=true msg=msg room=room subscription=subscription settings=settings templatePrefix='thread-' u=u}} + {{> message hideRoles=true msg=msg room=room subscription=subscription settings=settings templatePrefix='thread-' u=u context="threads"}} {{/each}} {{/if}} {{/with}} diff --git a/app/ui-message/client/message.js b/app/ui-message/client/message.js index 26239a58995..31803d19ea6 100644 --- a/app/ui-message/client/message.js +++ b/app/ui-message/client/message.js @@ -374,9 +374,13 @@ Template.message.helpers({ } return roomTypes.getIcon(room); }, + customClass() { + const { customClass, msg } = this; + return customClass || msg.customClass; + }, fromSearch() { - const { customClass } = this; - return customClass === 'search'; + const { customClass, msg } = this; + return [msg.customClass, customClass].includes('search'); }, actionContext() { const { msg } = this;