parent
bcc175041a
commit
36dd828a55
|
@ -41,13 +41,16 @@
|
||||||
|
|
||||||
(defn contact-two-names-by-identity
|
(defn contact-two-names-by-identity
|
||||||
[contact profile contact-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?
|
(if me?
|
||||||
[(or (:preferred-name profile)
|
[(cond
|
||||||
(:display-name profile)
|
(not (string/blank? preferred-name)) preferred-name
|
||||||
(:primary-name contact)
|
(not (string/blank? display-name)) display-name
|
||||||
(gfycat/generate-gfy contact-identity))]
|
(not (string/blank? primary-name)) primary-name
|
||||||
[(:primary-name contact) (:secondary-name contact)])))
|
:else (gfycat/generate-gfy contact-identity))]
|
||||||
|
[primary-name secondary-name])))
|
||||||
|
|
||||||
(defn displayed-photo
|
(defn displayed-photo
|
||||||
[{:keys [images]}]
|
[{:keys [images]}]
|
||||||
|
|
Loading…
Reference in New Issue