Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reply messages are sometimes not displayed #8162

Open
SakulFlee opened this issue Feb 22, 2023 · 13 comments
Open

Reply messages are sometimes not displayed #8162

SakulFlee opened this issue Feb 22, 2023 · 13 comments
Labels
A-Replies O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@SakulFlee
Copy link

Steps to reproduce

  1. Setup a standard Home-Server (Synapse) and Mautrix-Discord.
  2. Start a chat with someone on Discord, make them reply to your messages.
  3. View the reply message on Element-Android.

Outcome

What did you expect?

On Web and Desktop, the message is rendered correctly and can be read. This is to be expected on the Android side too.

What happened instead?

The reply message appears blank and can't be read.

I've detailed and made a demonstration over on Mautrix-Discord's repository, which can be viewed here (#59).

What I found so far is that inside the source of the reply over on Matrix the content.format and content.formatted_body fields are missing. Which I am guessing the Android Client expects (but Web and Desktop doesn't?).
The message is there, in the source view, and when replying to the "empty reply" it also shows up in the preview above the input field, but it won't display inside the chat.

I've also filed a bug inside the App with logs.
I'll happily provide more information and, if possible, fix this myself if I know where to start :)

Your phone model

Samsung A13

Operating system version

Android 13

Application version and app store

Element version 1.5.25 [40105251] (G-f74a885a), Matrix SDK 1.5.25 (f74a885), OLM version 3.2.12 from Google PlayStore

Homeserver

Selfhosted Synapse server version 1.71.0-r0; hosted on matrix.sakul-flee.de, federated

Will you send logs?

Yes

Are you willing to provide a PR?

Yes

@SakulFlee SakulFlee added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Feb 22, 2023
@mnaturel mnaturel added A-Replies S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely labels Feb 23, 2023
@noClaps
Copy link

noClaps commented Mar 4, 2023

This happens to me in non-bridged rooms too.

@SakulFlee
Copy link
Author

Interesting, this suggests it not being related to the bridge but some issue on the Android-App and/or Matrix server.

@noClaps Would you be so kind to share relevant information like the "source" of those messages, which homeserver, version of homeserver, etc.?

@noClaps
Copy link

noClaps commented Mar 5, 2023

I'm on the matrix.org homeserver, which I'm assuming is on the latest version.

I definitely think this is a client issue, as I don't experience this on other Matrix clients like Fluffychat.

When replying with /me message:
Screenshot_20230305-003120~3

Screenshot_20230305-003504~2

When replying with image:
Screenshot_20230305-003544~4

Screenshot_20230305-003839

I'm not sure if this is what you're looking for when you said "source". If it's something else, please let me know.

@SakulFlee
Copy link
Author

@noClaps That's exactly what I wanted to see, thank you!

I believe this also confirms my suspicion that, for some reason, if the format field is set to org.matrix.custom.html (or empty), the Android App fails to display it properly.

@SakulFlee SakulFlee changed the title Element-Android fails to render Replies send from Mautrix-Discord bridge Reply messages are sometimes not displayed Mar 5, 2023
@noClaps
Copy link

noClaps commented Mar 5, 2023

It also seems to fail if the reply is an image, which doesn't have the format field at all.

@AmineI
Copy link

AmineI commented Apr 12, 2023

I'm encountering this very frequently as well. An interesting workaround is to long press on the "empty" message, and the content seems to display in the menu preview.

@wapsi
Copy link

wapsi commented Jun 1, 2023

I'm having this issue as well. Especially the images do not show up in the Element Android version (on Android 11), when the user adds an image into reply message of existing message. In the desktop/web version of the Element this works just fine, though.

@vrozaksen
Copy link

vrozaksen commented Jun 3, 2023

Same issue here!
Samsung S22 Ultra with Android 13

Element:
Version: 1.5.32 [40105322] (G- 8dcb5f7)
Matrix SDK: 1.5.32 (8dcb5f7)

@tduboys
Copy link

tduboys commented Jan 29, 2024

Hello,
Same issue using signal bridge (issue mautrix/signal#384 )

Element version 1.6.10

@cmbarba
Copy link

cmbarba commented Feb 6, 2024

I'm experiencing this consistently with every reply in bridged rooms. My own replies are displayed, but replies from other bridged users are not. Replies are only missing from the room views; they are visible in the room preview in the list of rooms.

Replies are visible on desktop and web for me as well.

Version: 1.6.10 [40106102] (G-493093c2)

@xarxaxdev
Copy link

xarxaxdev commented Feb 12, 2024

Happening to me as well in an Android Phone Version 1.6.10

@wapsi
Copy link

wapsi commented Feb 14, 2024

FYI: As a workaround I'm using SchildiChat now (https://schildi.chat/), which is Element fork with some extra features/fixes applied. For instance, this issue does not happen on SchildiChat at all :)

@AmineI
Copy link

AmineI commented Jul 25, 2024

This issue destroyed the usability of element for me, so here is a one-line temporary fix I've been using. Tested out with all my bridges and couldn't notice any side effects, but I just made this in a few minutes so who knows.

.bodyForReply(currentTimelineEvent.getLastMessageContent(), true).formattedText ?: ""

-  .bodyForReply(currentTimelineEvent.getLastMessageContent(), true).formattedText ?: ""
+  .bodyForReply(currentTimelineEvent.getLastMessageContent(), true).takeFormatted()

Note that this is not an issue for other clients such as Element X or SchildiChat, so it would be better to cherry-pick from their implementations if anyone has the time and knowledge to dig deeper.
Issue is related to #8162 and its variants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Replies O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

9 participants