diff --git a/src/status_im/chat/events/send_message.cljs b/src/status_im/chat/events/send_message.cljs index 8bf065a713..83a7031f3c 100644 --- a/src/status_im/chat/events/send_message.cljs +++ b/src/status_im/chat/events/send_message.cljs @@ -34,11 +34,12 @@ (defn- send-message [{:keys [web3 network-status local-storage chats] :contacts/keys [contacts] + :accounts/keys [accounts current-account-id] :as db} {:keys [message-type content from chat-id to] :as message}] (let [{:keys [dapp? fcm-token]} (get contacts chat-id) {:keys [public-key private-key]} (get chats chat-id) - sender-name (get-in contacts [from :name])] + sender-name (get-in accounts [current-account-id :name])] ;; whenever we are sending message to DApp, we are assuming it's a status bot, ;; so we are just calling jail `on-message-send` function (when message diff --git a/src/status_im/chat/views/message/message.cljs b/src/status_im/chat/views/message/message.cljs index 8d460a1266..0f1cd10b80 100644 --- a/src/status_im/chat/views/message/message.cljs +++ b/src/status_im/chat/views/message/message.cljs @@ -24,12 +24,12 @@ (def window-width (:width (react/get-dimensions "window"))) -(defview message-author-name [{:keys [outgoing from] :as message}] +(defview message-author-name [{:keys [outgoing from username] :as message}] (letsubs [current-account [:get-current-account] incoming-name [:contact-name-by-identity from]] (when-let [name (if outgoing (:name current-account) - (or incoming-name (gfycat/generate-gfy from)))] + (or incoming-name username (gfycat/generate-gfy from)))] [react/text {:style style/author} name]))) (defview message-content-status []