element-hq / element-hq/element-ios

Inline URL preview does not work for bot provided URLs

Open
#5,246 1 comment 0 reactions 0 assignees View on GitHub
A-Timeline S-Minor T-Defect
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

Somewhat related to https://github.com/vector-im/element-ios/issues/888#issuecomment-984964910.

The is an option to allow inline preview of URLs. I have this activated on my IOS 15.1.1 Element client.
In an unencrypted room I expect to see URLs those URLs in preview mode. This is the case on on the Android client on Android 7 and the Element client for Linux 64. It doesnt matter if the URL is manually copied in the room, or if it is send by a bot.

For the links that are shared by a bot, the URLs on the IOS client are not shown in preview mode, only the manually input ones are.

I have been asked to provide the source of these messages. Two examples are shown below.

On the Element version 1.9.3 (Linux). URLs preload (same as on the latest Android client for Android 7).
{
"content": {
"body": "Road.cc RSS Feed: Van Rysel Merino Arm Warmers 900 ( https://road.cc/content/review/van-rysel-merino-arm-warmers-900-288325 )",
"format": "org.matrix.custom.html",
"formatted_body": "Road.cc RSS Feed:
Van Rysel Merino Arm Warmers 900",
"msgtype": "m.notice"
},
"origin_server_ts": 1638549169403,
"sender": "@neb_rssbot=40XXXX=3amatrix.org:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 2650723
},
"event_id": "$ArU0sZzcI_XVGjli_a1aA4fnDnZ5BWwzNiMuPvuwj-8",
"room_id": "!XXXX:matrix.org"
}

On IOS 15.1.1, here the urls dont preload.
{
"sender" : "@neb_rssbot=40XXXX=3amatrix.org:matrix.org",
"content" : {
"body" : "Road.cc RSS Feed: Van Rysel Merino Arm Warmers 900 ( https://road.cc/content/review/van-rysel-merino-arm-warmers-900-288325 )",
"formatted_body" : "Road.cc RSS Feed:
Van Rysel Merino Arm Warmers 900",
"msgtype" : "m.notice",
"format" : "org.matrix.custom.html"
},
"origin_server_ts" : 1638549169403,
"room_id" : "!XXXX:matrix.org",
"event_id" : "$ArU0sZzcI_XVGjli_a1aA4fnDnZ5BWwzNiMuPvuwj-8",
"unsigned" : {
"age" : 46706
},
"type" : "m.room.message"
}

### Outcome

I expect URL preview of when the option is activated, and the room is unencrypted.

URL preview only happens if the URL is manually input in the room, not when it is input by a bot.

### Your phone model

iphone mini 12

### Operating system version

ios 15.1.1

### Application version

Element 1.6.8

### Homeserver

matrix.org

### Will you send logs?

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.