Skip to content

Add experimental and incomplete support for MSC4306: Thread Subscriptions. #18674

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

Merged
merged 13 commits into from
Jul 21, 2025

Conversation

reivilibre
Copy link
Contributor

@reivilibre reivilibre commented Jul 10, 2025

Implements: MSC4306 (partially)

Commit-by-commit review suggested.

What's missing:

  • Changes to push rules

  1. Add thread_subscriptions table

  2. Add stream backed by thread_subscriptions table

  3. Add thread subscriptions handler

  4. Add thread subscriptions endpoints

  5. aside: note that EventID only applies to room versions 1 and 2

  6. Add tests for thread subscription endpoints

  7. docker workers: register thread_subscriptions worker as worker type

@reivilibre reivilibre changed the title Add experimental and incomplete support for [MSC4306: Thread Subscriptions](https://github.com/matrix-org/matrix-spec-proposals/blob/rei/msc_thread_subscriptions/proposals/4306-thread-subscriptions.md). Add experimental and incomplete support for MSC4306: Thread Subscriptions. Jul 10, 2025
@reivilibre reivilibre requested a review from Copilot July 11, 2025 10:25
Copilot

This comment was marked as outdated.

@reivilibre reivilibre force-pushed the rei/threads2_sub branch 3 times, most recently from 82fc0d9 to 07bbbcf Compare July 11, 2025 13:09
@reivilibre reivilibre requested a review from Copilot July 11, 2025 13:09
Copilot

This comment was marked as outdated.

@reivilibre reivilibre force-pushed the rei/threads2_sub branch 4 times, most recently from fe2541b to 79ecd7c Compare July 14, 2025 17:28
@reivilibre reivilibre marked this pull request as ready for review July 17, 2025 13:49
@reivilibre reivilibre requested a review from a team as a code owner July 17, 2025 13:49

CONSTRAINT thread_subscriptions_fk_rooms
FOREIGN KEY (room_id)
REFERENCES rooms(room_id),
Copy link
Member

Choose a reason for hiding this comment

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

We'll need to delete from this during purge room

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do you think a ON DELETE CASCADE is fair here or do we need to be a bit more paginated about the deletion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, to be fair .... we will already delete subscriptions when the event is deleted, so when deleting the actual room there shouldn't be anything left to delete. In that case I think ON DELETE CASCADE is fair as a last-resort. I'll add that + a comment saying as much

@reivilibre reivilibre requested a review from erikjohnston July 18, 2025 09:14
@reivilibre reivilibre merged commit 875269e into develop Jul 21, 2025
74 of 76 checks passed
@reivilibre reivilibre deleted the rei/threads2_sub branch July 21, 2025 14:54
reivilibre added a commit that referenced this pull request Aug 5, 2025
…omatic subscription conflict prevention as introduced in later drafts. (#18756)

Follows: #18674

Implements new drafts of MSC4306

---------

Signed-off-by: Olivier 'reivilibre <[email protected]>
Co-authored-by: Eric Eastwood <[email protected]>
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Aug 7, 2025
Tested on NetBSD 9 amd64 (federation, multiple clients)

# Synapse 1.135.0 (2025-08-01)

## Features

- Add `recaptcha_private_key_path` and `recaptcha_public_key_path` config option. ([\#17984](element-hq/synapse#17984), [\#18684](element-hq/synapse#18684))
- Add plain-text handling for rich-text topics as per [MSC3765](matrix-org/matrix-spec-proposals#3765). ([\#18195](element-hq/synapse#18195))
- If enabled by the user, server admins will see [soft failed](https://spec.matrix.org/v1.13/server-server-api/#soft-failure) events over the Client-Server API. ([\#18238](element-hq/synapse#18238))
- Add experimental support for [MSC4277: Harmonizing the reporting endpoints](matrix-org/matrix-spec-proposals#4277). ([\#18263](element-hq/synapse#18263))
- Add ability to limit amount of media uploaded by a user in a given time period. ([\#18527](element-hq/synapse#18527))
- Enable workers to write directly to the device lists stream and handle device list updates, reducing load on the main process. ([\#18581](element-hq/synapse#18581))
- Support arbitrary profile fields. Contributed by @clokep. ([\#18635](element-hq/synapse#18635))
- Advertise support for Matrix v1.12. ([\#18647](element-hq/synapse#18647))
- Add an option to issue redactions as an admin user via the [admin redaction endpoint](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html#redact-all-the-events-of-a-user). ([\#18671](element-hq/synapse#18671))
- Add experimental and incomplete support for [MSC4306: Thread Subscriptions](https://github.com/matrix-org/matrix-spec-proposals/blob/rei/msc_thread_subscriptions/proposals/4306-thread-subscriptions.md). ([\#18674](element-hq/synapse#18674))
- Include `event_id` when getting state with `?format=event`. Contributed by @tulir @ Beeper. ([\#18675](element-hq/synapse#18675))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants