element-hq / element-hq/element-ios
Incorrect syntax for user mentions
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
Mention a user from Element iOS nightly. For example: "I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔"
### Outcome
#### What did you expect?
This event was sent:
According to the spec:
* https://spec.matrix.org/v1.7/client-server-api/#mroommessage-msgtypes
Something like this should be sent:
```json
{
"content": {
"body": "I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
"format": "org.matrix.custom.html",
"formatted_body": "I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
"msgtype": "m.text"
},
...
}
```
allowing matrix-appservice-irc to translate it to:
```
I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔
```
#### What happened instead?
```json
{
"content": {
"body": "I DMed [tpb]() about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
"format": "org.matrix.custom.html",
"formatted_body": "I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
"msgtype": "m.text"
},
"origin_server_ts": 1690466951796,
"room_id": "!LhJjrGmNCUyJajtYYf:catircservices.org",
"sender": "@jevinskie:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 4266509
},
"event_id": "$30s5H_bel7LYbK_APhXlljW-hXq1bgSiQKjkzeLe-4Q",
"user_id": "@jevinskie:matrix.org",
"age": 4266509
}
```
https://matrix.to/#/!LhJjrGmNCUyJajtYYf:catircservices.org/$30s5H_bel7LYbK_APhXlljW-hXq1bgSiQKjkzeLe-4Q?via=matrix.org&via=catircservices.org
which causes the following to be sent to IRC through matrix-appservice-irc:
```
I DMed [tpb]() about what’s going on but I suspect I’m just talking to a bot/service. 🤔
```
(which then triggers URL snippet fetching, which is very noisy)
### Your phone model
_No response_
### Operating system version
_No response_
### Application version
nightly, 1.10.14 (20230621144257)
### Homeserver
_No response_
### Will you send logs?
No
Contributor guide
Assessment
This issue has not been assessed yet.