From 3825f19f06e6d9f5645138cb0114ebb803eebc03 Mon Sep 17 00:00:00 2001 From: alwx Date: Tue, 3 Jan 2017 16:30:37 +0300 Subject: [PATCH] Non-DApp Default Contact cannot receive messages or friend requests (#608) --- src/status_im/contacts/handlers.cljs | 2 ++ src/status_im/contacts/views/contact.cljs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/status_im/contacts/handlers.cljs b/src/status_im/contacts/handlers.cljs index f91038e9ba..10b8a5369b 100644 --- a/src/status_im/contacts/handlers.cljs +++ b/src/status_im/contacts/handlers.cljs @@ -82,6 +82,8 @@ :keypair {:public updates-public-key :private updates-private-key}}}}))) +(register-handler :send-contact-request! (u/side-effect! send-contact-request)) + (register-handler :update-contact! (fn [db [_ {:keys [whisper-identity] :as contact}]] (if (contacts/exists? whisper-identity) diff --git a/src/status_im/contacts/views/contact.cljs b/src/status_im/contacts/views/contact.cljs index 3a62bbb50c..3096290342 100644 --- a/src/status_im/contacts/views/contact.cljs +++ b/src/status_im/contacts/views/contact.cljs @@ -6,7 +6,8 @@ [status-im.contacts.views.contact-inner :refer [contact-inner-view]] [status-im.utils.platform :refer [platform-specific]])) -(defn- on-press [{:keys [whisper-identity]}] +(defn- on-press [{:keys [whisper-identity] :as contact}] + (dispatch [:send-contact-request! contact]) (dispatch [:start-chat whisper-identity {} :navigation-replace])) (defn- more-on-press [contact]