matrix-org / matrix-org/matrix-js-sdk

User data of "mentions" do not update upon a change of user data

Open
#1,465 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

Currently, the "mention" data is stored statically in the content body, see below:

"content": {
    "body": "Peter Pan: Hi",
    "format": "org.matrix.custom.html",
    "formatted_body": "<a href=\"https://matrix.to/#/@peterpan:matrix.org\">Peter Pan</a>: Hi",
    "msgtype": "m.text"
  },

In case the data of the mentioned user changed the stored "mention" data may not be correct anymore. It would be great if there would be a standardized way to store it in a more "dynamic" way, for instance by means of a custom HTML tag, like ... <mx-mention>[userId]</mx-mention>

This way a user mention could be dynamically generated based on the parsed data of the msg (formatted) content body.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how Matrix message content, including content.body and formatted_body, is represented and processed in the SDK. Clarify the standardized dynamic mention format and its compatibility requirements, then define completion as an agreed representation with behavior covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.