Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support threads in Matrix (MSC3440) #668

Merged
merged 10 commits into from
Mar 9, 2022
Merged

Support threads in Matrix (MSC3440) #668

merged 10 commits into from
Mar 9, 2022

Conversation

jaller94
Copy link
Contributor

@jaller94 jaller94 commented Feb 22, 2022

Fixes #634

Note: Slack doesn't seem to have a separate UI for replies. Everything is a thread.

Screenshot_2022-03-03_16-54-22

Definition of Done

  • Slack threads are bridged to Matrix as m.thread relations – removing the reply relation we currently set.

@jaller94 jaller94 marked this pull request as draft February 22, 2022 13:57
@jaller94
Copy link
Contributor Author

jaller94 commented Mar 3, 2022

Known issues (I'd like to file these as issues (if not already filed) and solve in different PRs):

  • Slack's feature "Also send to [main timeline]" isn't supported in Matrix. Messages will only show up in the thread.
  • Sending images and other files does not work in threads.
    • To be fair, they currently also don't work with Matrix replies. It's not a regression.
    • Slack -> Matrix: The image arrives in the main timeline, not in the thread.
    • Matrix -> Slack: The message appears in the thread, but is empty.

@jaller94 jaller94 changed the title Draft: Start development on Matrix threads Support threads in Matrix (MSC3440) Mar 3, 2022
@jaller94 jaller94 marked this pull request as ready for review March 3, 2022 16:20
@jaller94 jaller94 requested a review from a team March 3, 2022 16:20
@Half-Shot
Copy link
Contributor

Slack's feature "Also send to [main timeline]" isn't supported in Matrix. Messages will only show up in the thread.

Can we do a dumb thing where we just send the event twice to Matrix? Would this be too spammy? Alternatively should we comment on the proposal to raise the gap in the spec?

Sending images and other files does not work in threads.

I'd be reasonably okay with leaving this as an open issue to fix, if it's not an easy fix.

Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks super clean and appears to work, nice one!

},
},
"msgtype": "m.text", // for those who just want to send the reply as-is
"body": `${fallbackText}\n\n${this.prepareBody(text)}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm not sure if you still need a fallback or not, looking at what Element does:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Element does not provide this fallback.
I guess if a client or bridge (e.g. IRC) wants to display the relation, it up to that cleint's or bridge's implementation to provide an adequate representation.

changelog.d/634.feature Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support threads with m.thread relation (MSC3440)
2 participants