matrix-org / matrix-hookshot

A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
https://matrix-org.github.io/matrix-hookshot/
Apache License 2.0
283 stars 68 forks source link

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

Open zecakeh opened 3 months ago

zecakeh commented 3 months ago

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.