element-hq / element-hq/element-x-android

Certain types of images does not render on chat room

Open
#1,874 3 comments 11 reactions 0 assignees View on GitHub
A-Event Rendering O-Occasional O-Uncommon S-Major S-Minor T-Defect
Dominant language
Kotlin
Stars
2.4k
Forks
624
Avg merge
1d 14h
Merged PRs (30d)
149

Description

### Steps to reproduce

1. Receive an "telegram custom emoji" in an room where telegram bridge and thus telegram users exist.
2. Observe blank message in EXA, whereas old EA and Element-desktop shows something.

### Outcome

#### What did you expect?
As this "telegram custom emoji" is after all an html image tag in matrix-perspective, I expect to see the image, or at least the "alternative" normal emoji the hinting also provides with (unformatted) body and img alt tag.

#### What happened instead?
Seeing blank message.

Exploration from data, for the message screenshots there are 2 messages, first one is reply to an image in an room, the very next one is separate "normal" message through bridge.

First an screenshot from Element Desktop, somewhat the "this is how it should look":
![1](https://github.com/vector-im/element-x-android/assets/5422161/0174fd9d-0f86-4411-8f82-99a949c598a8)

Then screenshot from EXA:
![2](https://github.com/vector-im/element-x-android/assets/5422161/4515e40b-6ea8-4be7-b4da-95a53c91c8fa)

Also as an mention, EXAs orooms list that shows latest message preview which was the then latest "telegram custom emoji", this shows the "alternate" picture / emoji message also provides:
![3](https://github.com/vector-im/element-x-android/assets/5422161/b28808ca-4637-4d08-b297-3e1b5efe6566)

Bonus mention, no screenshot:
EA shows the "alt" emojis in the room, which is at least something, but generally the actual provided images should be shown in EXA too like they do in Element Desktop.

Both events with some private data redacted:

```json
{
"content": {
"body": "> an image\n\n😜",
"external_url": "hps//t.me/c/",
"fi.mau.telegram.source": {
"chat_id": ,
"id": ,
"peer_type": "channel",
"space":
},
"format": "org.matrix.custom.html",
"formatted_body": "

In reply to geezetatee
sent an image
\"😜\"",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$wYakXVI-Tz2boVDsxme_ccfUfYWF5E2NryHBdft8qO8"
}
},
"msgtype": "m.text"
},
"origin_server_ts": 1700747424000,
"sender": "@_telegram_:hacklab.fi",
"type": "m.room.message",
"unsigned": {
"age": 253
},
"event_id": "$snV_ryDpYRTNSHv1Oj1CKzSkygkQdccpXkJr0FHnBW0",
"room_id": "!exOOKPUBQshGCgBufD:hacklab.fi"
}
```

and

```json
{
"content": {
"body": "👍",
"external_url": "https://t.me/c/",
"fi.mau.telegram.source": {
"chat_id": ,
"id": ,
"peer_type": "channel",
"space":
},
"format": "org.matrix.custom.html",
"formatted_body": "\"👍\"",
"msgtype": "m.text"
},
"origin_server_ts": 1700747431000,
"sender": "@_telegram_:hacklab.fi",
"type": "m.room.message",
"unsigned": {
"age": 112
},
"event_id": "$MVSoKkzgZqEgt3gUiAJV-TJI718OZpJ-9CpKuDflQGY",
"room_id": "!exOOKPUBQshGCgBufD:hacklab.fi"
}
```

### Your phone model

Planet Computers Astro Slider

### Operating system version

Andoid 11

### Application version and app store

0.3.4-nightly (4003040)

### Homeserver

Hacklab.fi Synapse 1.96.1

### Will you send logs?

No

### Are you willing to provide a PR?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.