[fix 4574] do not send updates to pending contacts
fixes #4574 updates were sent to all pending contacts fixes that by filtering on the pending? key
This commit is contained in:
parent
65fa9e5741
commit
8782ecc06d
|
@ -68,7 +68,13 @@
|
|||
(defrecord ContactUpdate [name profile-image]
|
||||
message/StatusMessage
|
||||
(send [this _ {:keys [db] :as cofx}]
|
||||
(let [public-keys (into #{} (remove nil? (map :public-key (vals (:contacts/contacts db)))))
|
||||
(let [public-keys (reduce (fn [acc [_ {:keys [public-key pending?]}]]
|
||||
(if (and public-key
|
||||
(not pending?))
|
||||
(conj acc public-key)
|
||||
acc))
|
||||
#{}
|
||||
(:contacts/contacts db))
|
||||
recipients (filter #(public-keys (first %)) (:transport/chats db))]
|
||||
(handlers-macro/merge-effects
|
||||
cofx
|
||||
|
|
Loading…
Reference in New Issue