Merge pull request #571 from status-im/bug/#570
Fix for "Add to contacts" request (#570)
This commit is contained in:
commit
7fb7b60a65
|
@ -438,11 +438,6 @@
|
||||||
(dispatch [::start-chat! contact-id options navigation-type]))))))
|
(dispatch [::start-chat! contact-id options navigation-type]))))))
|
||||||
|
|
||||||
(register-handler :add-chat
|
(register-handler :add-chat
|
||||||
(u/side-effect!
|
|
||||||
(fn [_ [_ chat-id chat]]
|
|
||||||
(dispatch [::add-chat chat-id chat]))))
|
|
||||||
|
|
||||||
(register-handler ::add-chat
|
|
||||||
(-> add-new-chat
|
(-> add-new-chat
|
||||||
((enrich add-chat))
|
((enrich add-chat))
|
||||||
((after save-new-chat!))))
|
((after save-new-chat!))))
|
||||||
|
|
|
@ -385,19 +385,19 @@
|
||||||
(let [{{:keys [name profile-image address status]} :contact
|
(let [{{:keys [name profile-image address status]} :contact
|
||||||
{:keys [public private]} :keypair} payload
|
{:keys [public private]} :keypair} payload
|
||||||
|
|
||||||
contact {:whisper-identity from
|
contact {:whisper-identity from
|
||||||
:public-key public
|
:public-key public
|
||||||
:private-key private
|
:private-key private
|
||||||
:address address
|
:address address
|
||||||
:status status
|
:status status
|
||||||
:photo-path profile-image
|
:photo-path profile-image
|
||||||
:name name}
|
:name name}
|
||||||
contact-exist? (get contacts from)
|
contact-exists? (get contacts from)
|
||||||
chat {:name name
|
chat {:name name
|
||||||
:chat-id from
|
:chat-id from
|
||||||
:contact-info (prn-str contact)
|
:contact-info (prn-str contact)
|
||||||
:pending-contact? true}]
|
:pending-contact? true}]
|
||||||
(if contact-exist?
|
(if contact-exists?
|
||||||
(do
|
(do
|
||||||
(dispatch [:update-contact! contact])
|
(dispatch [:update-contact! contact])
|
||||||
(dispatch [:watch-contact contact]))
|
(dispatch [:watch-contact contact]))
|
||||||
|
|
Loading…
Reference in New Issue