diff --git a/src/status_im/contexts/chat/messenger/composer/actions/view.cljs b/src/status_im/contexts/chat/messenger/composer/actions/view.cljs index da7e16a21d..72ae80e84f 100644 --- a/src/status_im/contexts/chat/messenger/composer/actions/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/actions/view.cljs @@ -30,7 +30,7 @@ (js/setTimeout #(reanimated/set-shared-value background-y (- window-height)) 300) - (rf/dispatch [:chat.ui/replace-mentions-and-send-current-message]) + (rf/dispatch [:chat.ui/send-current-message]) (rf/dispatch [:chat.ui/set-input-maximized false]) (rf/dispatch [:chat.ui/set-input-content-height comp-constants/input-height]) (rf/dispatch [:chat.ui/set-chat-input-text nil]) diff --git a/src/status_im/contexts/chat/messenger/composer/events.cljs b/src/status_im/contexts/chat/messenger/composer/events.cljs index 0e7d392469..eb57dd99a3 100644 --- a/src/status_im/contexts/chat/messenger/composer/events.cljs +++ b/src/status_im/contexts/chat/messenger/composer/events.cljs @@ -207,24 +207,12 @@ (link-preview/reset-unfurled) (cancel-message-edit))) -(rf/defn replace-mentions-and-send-current-message +(rf/defn send-current-message "Sends message from current chat input" - {:events [:chat.ui/replace-mentions-and-send-current-message]} - [{{:keys [current-chat-id] :as db} :db}] - (let [{:keys [input-text metadata]} (get-in db [:chat/inputs current-chat-id])] - {:json-rpc/call [{:method "wakuext_chatMentionReplaceWithPublicKey" - :params [current-chat-id input-text] - :on-error #(log/error "[wakuext_chatMentionReplaceWithPublicKey] on-error" %) - :on-success #(rf/dispatch [:chat.ui/send-current-message-with-mentions - current-chat-id - (:editing-message metadata) - input-text - %])}]})) - -(rf/defn send-current-message-with-mentions - {:events [:chat.ui/send-current-message-with-mentions]} - [{:keys [db] :as cofx} current-chat-id editing-message input-text new-text] - (rf/merge cofx - (if editing-message - (send-edited-message new-text editing-message) - (send-messages new-text current-chat-id)))) + {:events [:chat.ui/send-current-message]} + [{{:keys [current-chat-id] :as db} :db :as cofx}] + (let [{:keys [input-text metadata]} (get-in db [:chat/inputs current-chat-id]) + editing-message (:editing-message metadata)] + (if editing-message + (send-edited-message cofx input-text editing-message) + (send-messages cofx input-text current-chat-id)))) diff --git a/status-go-version.json b/status-go-version.json index 5287eb2875..daa105e0aa 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.172.2", - "commit-sha1": "5cb1972261de90fee1469ae60ffb7f25900a9850", - "src-sha256": "1z37yinlxwpzprd10h2f4vzs5k2a1k85ks9lvl067lb4rqflcwny" + "version": "v0.172.5", + "commit-sha1": "ea3e59ffeefa623373b4a39ecf7fa5558e384ad0", + "src-sha256": "11rds4i2ylngaddiz5f4g0r0rzwplcbkg5c4wvwzzxl49gza50j3" }