mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
:update-contact! handler fixed (#559)
This commit is contained in:
parent
6002d53c97
commit
316e321b02
@ -83,9 +83,12 @@
|
||||
:private updates-private-key}}}})))
|
||||
|
||||
(register-handler :update-contact!
|
||||
(-> (fn [db [_ {:keys [whisper-identity] :as contact}]]
|
||||
(fn [db [_ {:keys [whisper-identity] :as contact}]]
|
||||
(if (contacts/exists? whisper-identity)
|
||||
(do
|
||||
(contacts/save contact)
|
||||
(update-in db [:contacts whisper-identity] merge contact))
|
||||
((after save-contact))))
|
||||
db)))
|
||||
|
||||
(defn load-contacts! [db _]
|
||||
(let [contacts (->> (contacts/get-all)
|
||||
|
Loading…
x
Reference in New Issue
Block a user