element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
Apache License 2.0
3.26k stars 676 forks source link

Polls which are in reply to another message don't get rendered #8818

Open Eco-Gaming opened 2 months ago

Eco-Gaming commented 2 months ago

Steps to reproduce

  1. Be in a groupchat
  2. Have another member send a message
  3. Have another member reply to the above message with a poll
  4. See the poll not rendering

I don't think the Element client (and most other clients presumably) can send polls as a reply to another message. The WhatsAppBridgeBot by mautrix however copies these messages 1:1 from WhatsApp and they are shown properly in Element on Desktop, so from what I can see this should be an issue in Element mobile. (The messages in the screenshots below were all sent by the same user in WhatsApp and bridged into Matrix by the mautrix WhatsApp Bridge)

mobile view: Element-mobile

desktop view: Element-desktop

Outcome

What did you expect?

I expected the poll to shown up and to be able to vote in it.

What happened instead?

An empty message is shown.

Interestingly on a separate phone (Galaxy S10, Android 12, same Element version), while loading messages in the groupchat the poll first showed up, but as the messages finished loading the message turned blank. I presume my Pixel 6 would've had the same outcome had it loaded the messages more slowly. -> I guess this should point to some Exception happening leading to some render method for the message body to crash and in turn return an empty body

extra info: I've set PR to No as I have very little time right now, but if it might be or is an easy fix, I might be able to squeeze it in.

Your phone model

Pixel 6

Operating system version

Android 14

Application version and app store

Element 1.6.12 F-Droid

Homeserver

Synapse (should be latest, I don't have access to the exact version right now)

Will you send logs?

Yes

Are you willing to provide a PR?

No