From b7cc54a3566e3a385beac50c22d3c9fdfd508bca Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Thu, 25 May 2023 14:01:42 +0530 Subject: [PATCH] fix pin image in community leads to error (#16017) --- .../contexts/chat/messages/pin/banner/view.cljs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/status_im2/contexts/chat/messages/pin/banner/view.cljs b/src/status_im2/contexts/chat/messages/pin/banner/view.cljs index 834246e03b..f71c39dffb 100644 --- a/src/status_im2/contexts/chat/messages/pin/banner/view.cljs +++ b/src/status_im2/contexts/chat/messages/pin/banner/view.cljs @@ -18,12 +18,15 @@ latest-pin-text (message-text pinned-message) {:keys [deleted? deleted-for-me?]} pinned-message pins-count (rf/sub [:chats/pin-messages-count chat-id]) - content-type-text? (= (:content-type pinned-message) constants/content-type-text) latest-pin-text - (cond deleted? (i18n/label :t/message-deleted-for-everyone) - deleted-for-me? (i18n/label :t/message-deleted-for-you) - content-type-text? (resolver/resolve-message latest-pin-text) - :else latest-pin-text)] + (cond deleted? (i18n/label :t/message-deleted-for-everyone) + deleted-for-me? (i18n/label :t/message-deleted-for-you) + (#{constants/content-type-text + constants/content-type-image + constants/content-type-sticker} + (:content-type pinned-message)) + (resolver/resolve-message latest-pin-text) + :else latest-pin-text)] [quo/banner {:latest-pin-text latest-pin-text :pins-count pins-count