diff --git a/src/status_im/chat/views/request_message.cljs b/src/status_im/chat/views/request_message.cljs index d467483b1c..05df2a70d0 100644 --- a/src/status_im/chat/views/request_message.cljs +++ b/src/status_im/chat/views/request_message.cljs @@ -5,6 +5,7 @@ animated-view text image + icon touchable-highlight]] [status-im.chat.styles.message :as st] [status-im.models.commands :refer [parse-command-request]] @@ -64,9 +65,8 @@ :style st/command-request-image-touchable :accessibility-label (label command)} [animated-view {:style (st/command-request-image-view command scale-anim-val)} - (if command-icon - [image {:source {:uri command-icon} - :style st/command-request-image}])]]))}))) + (when command-icon + [icon command-icon st/command-request-image])]]))}))) (defn message-content-command-request [{:keys [message-id content from incoming-group]}] diff --git a/src/status_im/data_store/messages.cljs b/src/status_im/data_store/messages.cljs index b5fcdc8ea0..6dbc9ffbfd 100644 --- a/src/status_im/data_store/messages.cljs +++ b/src/status_im/data_store/messages.cljs @@ -14,7 +14,12 @@ (defn- str-to-map [s] - (keywordize-keys (apply hash-map (split s #"[;=]")))) + (->> (keywordize-keys (apply hash-map (split s #"[;=]"))) + (map (fn [[k v]] + [k (if (= k :params) + (read-string v) + v)])) + (into {}))) (defn- user-statuses-to-map [user-statuses] @@ -76,9 +81,9 @@ (map-to-str content)) message' (merge default-values message - {:chat-id chat-id - :content content' - :timestamp (timestamp)})] + {:chat-id chat-id + :content content' + :timestamp (timestamp)})] (data-store/save message')))) (defn update