This commit is contained in:
Roman Volosovskyi 2017-01-02 11:47:57 +02:00
parent b93cc4669e
commit 5d405e8e51
1 changed files with 6 additions and 3 deletions

View File

@ -168,9 +168,12 @@
(register-handler :set-chat-input-text
(u/side-effect!
(fn [{:keys [current-chat-id]} [_ text]]
;; fixes https://github.com/status-im/status-react/issues/594
;; todo: revisit with more clever solution
(let [text' (if (= text "! ") "!" text)]
(if (console? current-chat-id)
(dispatch [::check-input-for-commands text])
(dispatch [::check-suggestions current-chat-id text])))))
(dispatch [::check-input-for-commands text'])
(dispatch [::check-suggestions current-chat-id text']))))))
(register-handler :add-to-chat-input-text
(u/side-effect!