From 5c5406021709b91c2aaa8cd7b12daed8429b4ba7 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 29 Jun 2016 13:48:53 +0300 Subject: [PATCH] staged command content Former-commit-id: fe8ef287aab19af92bc01cda54382f8605a66949 --- src/status_im/chat/handlers.cljs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/status_im/chat/handlers.cljs b/src/status_im/chat/handlers.cljs index d5d5a1d63b..26f7683ac1 100644 --- a/src/status_im/chat/handlers.cljs +++ b/src/status_im/chat/handlers.cljs @@ -107,10 +107,11 @@ (after invoke-command-preview!) (fn [{:keys [current-chat-id] :as db} _] (let [db (update-input-text db nil) - {:keys [command content]} - (get-in db [:chats current-chat-id :command-input]) - command-info {:command command - :content content}] + {:keys [command content]} (get-in db [:chats current-chat-id :command-input]) + content' (if (= :command (:type command)) + (subs content 2) + content) + command-info {:command command :content content'}] (-> db ;(assoc-in [:chats current-chat-id :command-input :command] nil) (commands/stage-command command-info)