fix pin image in community leads to error (#16017)

This commit is contained in:
Parvesh Monu 2023-05-25 14:01:42 +05:30 committed by GitHub
parent e1e596cf5f
commit b7cc54a356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -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