[#17446] fix: Display name is not shown in chats after sync (#17591)

This commit is contained in:
Mohsen 2023-10-10 14:36:40 +03:00 committed by GitHub
parent bcc175041a
commit 36dd828a55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -41,13 +41,16 @@
(defn contact-two-names-by-identity
[contact profile contact-identity]
(let [me? (= (:public-key profile) contact-identity)]
(let [{:keys [public-key preferred-name display-name]} profile
{:keys [primary-name secondary-name]} contact
me? (= public-key contact-identity)]
(if me?
[(or (:preferred-name profile)
(:display-name profile)
(:primary-name contact)
(gfycat/generate-gfy contact-identity))]
[(:primary-name contact) (:secondary-name contact)])))
[(cond
(not (string/blank? preferred-name)) preferred-name
(not (string/blank? display-name)) display-name
(not (string/blank? primary-name)) primary-name
:else (gfycat/generate-gfy contact-identity))]
[primary-name secondary-name])))
(defn displayed-photo
[{:keys [images]}]