Add stable support for MSC4380 invite blocking.#19431
Conversation
|
I don't propose to add a migration for users with existing MSC4380 account data, because to the best of my knowledge there aren't really any (and anyway, if they were relying on an unstable feature then they can keep both halves when it breaks). I'll probably do a manual migration on matrix.org once this and the EW equivalent have rolled out. |
MSC4380 has now completed FCP, so we can add stable support for it.
2d38ee7 to
db67566
Compare
| user_id: The user whose invite configuration should be returned. | ||
| """ | ||
| if self._msc4380_enabled: | ||
| data = await self.get_global_account_data_by_type_for_user( |
There was a problem hiding this comment.
It feels like it wouldn't cost much to also read the unstable invite rule here, what's the reasoning for not keeping that? Is this because we'd prefer running a one-time migration?
There was a problem hiding this comment.
-
I'm not really expecting anyone to have a
org.matrix.msc4380.invite_permission_configaccount data. For anyone to have set it and it to have had an effect, they must have deployed their own server and enabled the experimental option, so they should have known that they were using an experimental feature that they should have expected to break under them. So reading the unstable account data would be code that we have to carry around (for ever?) for no real purpose. -
I'm pretty opposed to Synapse implementing unstable features out of the box, because it's a slippery slope where people come to rely on the unstable feature existing and we end up having to spec it despite it having a stupid name.
So, if we were to keep this, we'd have to keep the corresponding
experimentalconfig flag to opt into it, which means there is even more code that we have to lug around. (And, IMHO, there are already far too manyexperimentalflags; we ought to be looking to rip them out, not allow then to proliferate.)
In short: I'm 👎 on keeping support for the unstable account data.
| "org.matrix.msc4354": self.config.experimental.msc4354_enabled, | ||
| # MSC4380: Invite blocking | ||
| "org.matrix.msc4380": self.config.experimental.msc4380_enabled, | ||
| "org.matrix.msc4380.stable": True, |
There was a problem hiding this comment.
For my own reference:
Once this proposal completes FCP, servers may advertise support for the stable identifiers by listing org.matrix.msc4380.stable in unstable_features; clients may use this while they are waiting for the server to adopt a version of the spec that includes it.
Co-authored-by: Quentin Gliech <quenting@element.io>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [element-hq/synapse](https://github.com/element-hq/synapse) | minor | `v1.148.0` → `v1.149.0` | --- ### Release Notes <details> <summary>element-hq/synapse (element-hq/synapse)</summary> ### [`v1.149.0`](https://github.com/element-hq/synapse/releases/tag/v1.149.0) [Compare Source](element-hq/synapse@v1.148.0...v1.149.0) ### Synapse 1.149.0 (2026-03-10) No significant changes since 1.149.0rc1. ### Synapse 1.149.0rc1 (2026-03-03) #### Features - Add experimental support for [MSC4388: Secure out-of-band channel for sign in with QR](matrix-org/matrix-spec-proposals#4388). ([#​19127](element-hq/synapse#19127)) - Add stable support for [MSC4380](matrix-org/matrix-spec-proposals#4380) invite blocking. ([#​19431](element-hq/synapse#19431)) #### Bugfixes - Fix the 'Login as a user' Admin API not checking if the user exists before issuing an access token. ([#​18518](element-hq/synapse#18518)) - Fix `/sync` missing membership event in `state_after` (experimental [MSC4222](matrix-org/matrix-spec-proposals#4222) implementation) in some scenarios. ([#​19460](element-hq/synapse#19460)) #### Internal Changes - Add log to explain when and why we freeze objects in the garbage collector. ([#​19440](element-hq/synapse#19440)) - Better instrument `JoinRoomAliasServlet` with tracing. ([#​19461](element-hq/synapse#19461)) - Fix Complement CI not running against the code from our PRs. ([#​19475](element-hq/synapse#19475)) - Log `docker system info` in CI so we have a plain record of how GitHub runners evolve over time. ([#​19480](element-hq/synapse#19480)) - Rename the `test_disconnect` test helper so that pytest doesn't see it as a test. ([#​19486](element-hq/synapse#19486)) - Add a log line when we delete devices. Contributed by [@​bradtgmurray](https://github.com/bradtgmurray) @​ Beeper. ([#​19496](element-hq/synapse#19496)) - Pre-allocate the buffer based on the expected `Content-Length` with the Rust HTTP client. ([#​19498](element-hq/synapse#19498)) - Cancel long-running sync requests if the client has gone away. ([#​19499](element-hq/synapse#19499)) - Try and reduce reactor tick times when under heavy load. ([#​19507](element-hq/synapse#19507)) - Simplify Rust HTTP client response streaming and limiting. ([#​19510](element-hq/synapse#19510)) - Replace deprecated collection import locations with current locations. ([#​19515](element-hq/synapse#19515)) - Bump most locked Python dependencies to their latest versions. ([#​19519](element-hq/synapse#19519)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41OS4yIiwidXBkYXRlZEluVmVyIjoiNDMuNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/4580 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Tested on NetBSD 10 amd64 in a mostly 2025Q2 environment. # Synapse 1.149.1 (2026-03-11) # Synapse 1.149.0 (2026-03-10) ## Features - Add experimental support for [MSC4388: Secure out-of-band channel for sign in with QR](matrix-org/matrix-spec-proposals#4388). ([\#19127](element-hq/synapse#19127)) - Add stable support for [MSC4380](matrix-org/matrix-spec-proposals#4380) invite blocking. ([\#19431](element-hq/synapse#19431))
MSC4380 has now completed FCP, so we can add stable support for it.
EW pr is element-hq/element-web#31966