From 5d405e8e51b951cbcd2577e2de8cc087502b5f1c Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 2 Jan 2017 11:47:57 +0200 Subject: [PATCH] fix #594 --- src/status_im/chat/handlers.cljs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/status_im/chat/handlers.cljs b/src/status_im/chat/handlers.cljs index 023c9f9b69..87de93247a 100644 --- a/src/status_im/chat/handlers.cljs +++ b/src/status_im/chat/handlers.cljs @@ -168,9 +168,12 @@ (register-handler :set-chat-input-text (u/side-effect! (fn [{:keys [current-chat-id]} [_ text]] - (if (console? current-chat-id) - (dispatch [::check-input-for-commands text]) - (dispatch [::check-suggestions 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'])))))) (register-handler :add-to-chat-input-text (u/side-effect!