fix: display name not displayed after sync (#17311)

This commit is contained in:
frank 2023-09-19 17:18:38 +08:00 committed by GitHub
parent f2366219a3
commit d5af6b62a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -24,10 +24,11 @@
(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 primary-name]}]
(let [display-name (if (string/blank? display-name) nil display-name)
ens-name (or preferred-name
display-name
name)]
(let [display-name (if (string/blank? display-name) nil display-name)
preferred-name (if (string/blank? preferred-name) nil preferred-name)
ens-name (or preferred-name
display-name
name)]
;; Preferred name is our own otherwise we make sure it's verified
(if (or preferred-name (and ens-verified name))
ens-name