Skip to content

Commit

Permalink
support fall back (unparsed messages)
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull committed May 20, 2024
1 parent dcb5f7e commit f57eabe
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/status_im/contexts/chat/messenger/messages/content/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,21 @@

(declare on-long-press)

(defn- bridge-message-content
[content]
[quo/text
{:size :paragraph-1
:style {:line-height 22.75}}
content])

(defn user-message-content
[]
(let [show-delivery-state? (reagent/atom false)]
(fn [{:keys [message-data context keyboard-shown? hide-reactions?
in-reaction-or-action-menu? show-user-info?]}]
(let [theme (quo.theme/use-theme)
{:keys [content-type quoted-message content outgoing outgoing-status pinned-by pinned
bridge-message
last-in-group? message-id chat-id]} message-data
{:keys [disable-message-long-press?]} context
first-image (first (:album message-data))
Expand Down Expand Up @@ -179,7 +187,13 @@
chat-id])
six-reactions? (-> reactions
count
(= 6))]
(= 6))
content-type (if (and (=
content-type
constants/content-type-bridge-message)
(seq (:parsed-text content)))
constants/content-type-text
content-type)]
[rn/touchable-highlight
{:accessibility-label (if (and outgoing (= outgoing-status :sending))
:message-sending
Expand Down Expand Up @@ -230,7 +244,7 @@
[content.text/text-content message-data context]

constants/content-type-bridge-message
[content.text/text-content message-data context]
[bridge-message-content (:content bridge-message)]

constants/content-type-contact-request
[content.text/text-content message-data context]
Expand Down

0 comments on commit f57eabe

Please sign in to comment.