Skip to content

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Nov 18, 2025

MSC4380 aims to be a simplified implementation of MSC4155; the hope is that we can get it specced and rolled out rapidly, so that we can resolve the fact that matrix.org has enabled MSC4155.

The implementation leans heavily on what's already there for MSC4155.

It has its own experimental_features flag. If both MSC4155 and MSC4380 are enabled, and a user has both configurations set, then we prioritise the MSC4380 one.

Contributed wearing my 🎩 Spec Core Team hat.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@richvdh richvdh requested a review from a team as a code owner November 18, 2025 23:47
In particular, make `InviteRulesConfig` a base class which can have multiple
operations. To demonstarate it, use an `AllowAllInviteRulesConfig` class for
the common case where the user has no config.
An implementation of MSC4380, leaning heavily on what's already there for
MSC4155.

It has its own `experimental_features` flag. If both MSC4155 and MSC4380 are
enabled, and a user has both configurations set, then we prioritise the MSC4380
one.
@richvdh richvdh force-pushed the rav/invite_blocking branch from c491633 to 9df4502 Compare November 19, 2025 00:00
@MadLittleMods MadLittleMods changed the title Implement MSC4380 Implement MSC4380: Invite blocking Nov 19, 2025
self.bob_token = self.login("bob", "pass")

@override_config({"experimental_features": {"msc4380_enabled": True}})
def test_misc4380_block_invite_local(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like we should just verify this behavior with some Complement tests instead

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't disagree that Complement tests would be nice to have (in addition), but having these tests mean we get a tighter development cycle and it's easier to test different combinations (eg what happens when msc4380 is disabled).

Copy link
Contributor

Choose a reason for hiding this comment

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

🤷 We ran into this with the Sliding Sync tests. We naturally fell into writing Synapse tests but they would have much more benefit as Complement tests so other homeserver implementations can verify behavior.

(eg what happens when msc4380 is disabled).

Out-of-repo Complement tests can also be written for this kind of thing. For example, while we don't have this setup for the Synapse project, we do for the Secure Border Gateway, TI-Messenger Proxy, and Synapse Pro for small hosts. Something for the future here ⏩

@richvdh richvdh force-pushed the rav/invite_blocking branch from 0a2ba48 to 277619b Compare November 25, 2025 22:53
@richvdh
Copy link
Member Author

richvdh commented Nov 26, 2025

277619b makes some minor changes to the format of the account data, but I'm going to take the spirit of Eric's ✔️ and run with it.

@richvdh richvdh enabled auto-merge (squash) November 26, 2025 09:03
@richvdh richvdh merged commit c928347 into develop Nov 26, 2025
177 of 185 checks passed
@richvdh richvdh deleted the rav/invite_blocking branch November 26, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants