matrix-org / matrix-org/matrix-hookshot

GitLab hook's thread relations don't play well with Matrix clients that don't support threads

Open
#959 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
450
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
23

Description

Currently, the GitLab hook keeps track of "discussions" for comments, and sends the event for the new comment in a thread as `${author} replied with ${n} comment`.

In a Matrix client that doesn't support threads, it becomes unclear what was replied to. There is no rich reply fallback relation in the thread relation so they can't link it to the previous message in the thread, and there is no context in the message, even regarding which MR/issue it belongs to, so the notice doesn't feel very useful.

The simple solution here would be to send the rich reply fallback relation, which means we need to always keep track of the latest event ID, as well as the thread root ID for every discussion.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the GitLab hook's discussion event handling and how Matrix thread relations are constructed. Verify how the latest event ID and thread root ID are tracked for each discussion; done means non-thread-capable clients receive a rich reply fallback that identifies the preceding message and preserves the discussion context.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.