Skip to content

Push relevant users if there's a knock on a room (MSC4506)#19955

Open
ara4n wants to merge 3 commits into
developfrom
matthew/msc4506-knock-push-rule
Open

Push relevant users if there's a knock on a room (MSC4506)#19955
ara4n wants to merge 3 commits into
developfrom
matthew/msc4506-knock-push-rule

Conversation

@ara4n

@ara4n ara4n commented Jul 14, 2026

Copy link
Copy Markdown
Member

Implement MSC4506

Adds the recipient_permission push rule condition; matches if and only if the user the rules are being evaluated for has a power level >= that required to perform the power-levels action named by key.

Uses it in a new default override rule .org.matrix.msc4506.rule.knock (inserted before .m.rule.member_event, which otherwise suppresses all member events) so that members who can invite (i.e. accept the knock) are pushed when someone knocks.

Gated behind experimental_features.msc4506_enabled.

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)

Adds the recipient_permission push rule condition (unstable kind
org.matrix.msc4506.recipient_permission): matches iff the user the rules
are being evaluated for has a power level >= that required to perform
the power-levels action named by `key`. Uses it in a new default
override rule .org.matrix.msc4506.rule.knock (inserted before
.m.rule.member_event, which otherwise suppresses all member events) so
that members who can invite -- i.e. accept the knock (MSC2403) -- are
pushed when someone knocks. Also lifts the member-event fast-path in
the bulk evaluator for knocks, which otherwise evaluates rules for
nobody (a knock's sender == state_key).

Gated behind experimental_features.msc4506_enabled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uk8aPxHn3BHCe52L226jdG
@ara4n
ara4n requested a review from a team as a code owner July 14, 2026 15:49
@ara4n ara4n changed the title Add a default push rule notifying users who can act on a knock (MSC4506) Push relevant users if there's a knock on a room (MSC4506) Jul 14, 2026
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.

2 participants