Skip to content

Commit

Permalink
fix pin image in community leads to error (#16017)
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull authored and rahulpsingh committed May 26, 2023
1 parent 4bb133a commit 24ae46e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/status_im2/contexts/chat/messages/pin/banner/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24ae46e

Please sign in to comment.