element-hq / element-hq/element-ios

Reply objects contain literal strings localized to sender's client

Open
#2,409 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

### Description

The title says it all: the JSON source of a message send in reply to another contains the "In reply to" string, localized in the sender's client's language, as a literal in the `formatted-body` field.

In addition to the bad UX that this leads to in clients other than Riot that automatically display the `formatted-body` of a message, this leaks personal information about users, and has the potential to reduce a user's ability to be pseudonymous if they have their Riot client localized into a rare language.

### Steps to reproduce

- User 1 replies to a message (any message) with their client's language set to Language 1
- User 2 clicks View Source on that reply (or views it normally in WeeChat matrix!).
- "In reply to" message will always be in Language 1, regardless of User 2's language settings.

Here's (part of) an example JSON object from viewing the source of a reply:

```
{
"content": {
...
"formatted_body": "

Válaszolva erre: @kechpaja:matrix.org
Original Message
Reply",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "..."
}
},
...
},
}
```

Note that the "In reply to" text is in Hungarian ("Válaszolva erre"), which my (User 1's) client was set to.

At least from my perspective, it seems like it would make the most sense for the "In reply to" message to be set by the viewer's client, not the sender's (it would probably also make sense to remove the plaintext of the original message from the reply entirely).

### Version information

0.8.4

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.