From 353d50d6bf27bd2f654bd90931f0c6199fecec6b Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 21 Nov 2016 17:23:50 +0200 Subject: [PATCH] fix #472 --- src/status_im/chat/handlers/receive_message.cljs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/status_im/chat/handlers/receive_message.cljs b/src/status_im/chat/handlers/receive_message.cljs index 7eec5588ec..79c664c603 100644 --- a/src/status_im/chat/handlers/receive_message.cljs +++ b/src/status_im/chat/handlers/receive_message.cljs @@ -6,6 +6,7 @@ [status-im.commands.utils :refer [generate-hiccup]] [status-im.utils.random :as random] [status-im.constants :refer [wallet-chat-id + content-type-command content-type-command-request] :as c] [cljs.reader :refer [read-string]] @@ -61,8 +62,10 @@ (when (= (:content-type message') content-type-command-request) (dispatch [:add-request chat-id' message'])) (dispatch [:add-unviewed-message chat-id' message-id])) - (if (and (not= chat-id wallet-chat-id) - (= "send" (get-in message [:content :command]))) + (if (and + (= (:content-type message) content-type-command) + (not= chat-id wallet-chat-id) + (= "send" (get-in message [:content :command]))) (add-message-to-wallet db message))))) (defn add-message-to-wallet [db {:keys [content-type] :as message}]