diff --git a/src/status_im/chat/models/input.cljs b/src/status_im/chat/models/input.cljs index f4a3928ac9..a7a83ec1f2 100644 --- a/src/status_im/chat/models/input.cljs +++ b/src/status_im/chat/models/input.cljs @@ -103,13 +103,17 @@ Input: ['/send' 'Jarrad' '1.0'] Output: '/send Jarrad 1.0' + Input: ['/send' '\"Jarrad\"' '1.0'] + Output: '/send Jarrad 1.0' + Input: ['/send' 'Complex name with space in between' '1.0'] Output: '/send \"Complex name with space in between\" 1.0'" (->> args (map (fn [arg] - (if (not (str/index-of arg const/spacing-char)) - arg - (str const/arg-wrapping-char arg const/arg-wrapping-char)))) + (let [arg (str/replace arg (re-pattern const/arg-wrapping-char) "")] + (if (not (str/index-of arg const/spacing-char)) + arg + (str const/arg-wrapping-char arg const/arg-wrapping-char))))) (str/join const/spacing-char))) (defn selected-chat-command diff --git a/src/status_im/chat/views/message/request_message.cljs b/src/status_im/chat/views/message/request_message.cljs index 99f3d87333..3ebbd92744 100644 --- a/src/status_im/chat/views/message/request_message.cljs +++ b/src/status_im/chat/views/message/request_message.cljs @@ -16,8 +16,7 @@ (def request-message-icon-scale-delay 600) (defn set-chat-command [message-id command] - (let [command-key (keyword (:name command)) - metadata {:to-message-id message-id}] + (let [metadata {:to-message-id message-id}] (dispatch [:select-chat-input-command command metadata]))) (def min-scale 1)