Merge pull request #571 from status-im/bug/#570

Fix for "Add to contacts" request (#570)
This commit is contained in:
Roman Volosovskyi 2016-12-21 17:22:22 +02:00 committed by GitHub
commit 7fb7b60a65
2 changed files with 13 additions and 18 deletions

View File

@ -438,11 +438,6 @@
(dispatch [::start-chat! contact-id options navigation-type]))))))
(register-handler :add-chat
(u/side-effect!
(fn [_ [_ chat-id chat]]
(dispatch [::add-chat chat-id chat]))))
(register-handler ::add-chat
(-> add-new-chat
((enrich add-chat))
((after save-new-chat!))))

View File

@ -392,12 +392,12 @@
:status status
:photo-path profile-image
:name name}
contact-exist? (get contacts from)
contact-exists? (get contacts from)
chat {:name name
:chat-id from
:contact-info (prn-str contact)
:pending-contact? true}]
(if contact-exist?
(if contact-exists?
(do
(dispatch [:update-contact! contact])
(dispatch [:watch-contact contact]))