fix mention turns into unknown in community (#15285)
This commit is contained in:
parent
0345871b66
commit
e9310a2ace
|
@ -25,7 +25,7 @@
|
|||
|
||||
(defn displayed-name
|
||||
"Use preferred name, display-name, name or alias in that order"
|
||||
[{:keys [name display-name preferred-name alias public-key ens-verified]}]
|
||||
[{:keys [name display-name preferred-name alias public-key ens-verified primary-name]}]
|
||||
(let [display-name (if (string/blank? display-name) nil display-name)
|
||||
ens-name (or preferred-name
|
||||
display-name
|
||||
|
@ -33,7 +33,7 @@
|
|||
;; Preferred name is our own otherwise we make sure it's verified
|
||||
(if (or preferred-name (and ens-verified name))
|
||||
ens-name
|
||||
(or display-name alias (gfycat/generate-gfy public-key)))))
|
||||
(or display-name primary-name alias (gfycat/generate-gfy public-key)))))
|
||||
|
||||
(defn contact-by-identity
|
||||
[contacts identity]
|
||||
|
|
|
@ -217,11 +217,13 @@
|
|||
all-contacts (:contacts/contacts db)
|
||||
chat (get-in db [:chats chat-id])
|
||||
current-multiaccount (:multiaccount db)
|
||||
community-members (when (= (:chat-type chat) chat.constants/community-chat-type)
|
||||
(get-in db [:communities (:community-id chat) :members]))
|
||||
mentionable-users (mentions/get-mentionable-users
|
||||
chat
|
||||
all-contacts
|
||||
current-multiaccount
|
||||
nil)
|
||||
community-members)
|
||||
hydrated-mentions (map
|
||||
(fn [[t mention :as e]]
|
||||
(if (= t :mention)
|
||||
|
|
Loading…
Reference in New Issue