This commit is contained in:
Roman Volosovskyi 2016-11-21 17:23:50 +02:00
parent adfd3ac2c4
commit 353d50d6bf
1 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,7 @@
[status-im.commands.utils :refer [generate-hiccup]] [status-im.commands.utils :refer [generate-hiccup]]
[status-im.utils.random :as random] [status-im.utils.random :as random]
[status-im.constants :refer [wallet-chat-id [status-im.constants :refer [wallet-chat-id
content-type-command
content-type-command-request] content-type-command-request]
:as c] :as c]
[cljs.reader :refer [read-string]] [cljs.reader :refer [read-string]]
@ -61,7 +62,9 @@
(when (= (:content-type message') content-type-command-request) (when (= (:content-type message') content-type-command-request)
(dispatch [:add-request chat-id' message'])) (dispatch [:add-request chat-id' message']))
(dispatch [:add-unviewed-message chat-id' message-id])) (dispatch [:add-unviewed-message chat-id' message-id]))
(if (and (not= chat-id wallet-chat-id) (if (and
(= (:content-type message) content-type-command)
(not= chat-id wallet-chat-id)
(= "send" (get-in message [:content :command]))) (= "send" (get-in message [:content :command])))
(add-message-to-wallet db message))))) (add-message-to-wallet db message)))))