Skip to content

Implement MSC4506 knock push notifications - #5425

Draft
ara4n wants to merge 2 commits into
developfrom
matthew/knock-push-notifications
Draft

Implement MSC4506 knock push notifications#5425
ara4n wants to merge 2 commits into
developfrom
matthew/knock-push-notifications

Conversation

@ara4n

@ara4n ara4n commented Jul 16, 2026

Copy link
Copy Markdown
Member

This lets js-sdk know about push notifications for knock rules as per MSC4506, as needed for element-hq/element-web#34268

@ara4n
ara4n requested a review from a team as a code owner July 16, 2026 11:26
@ara4n
ara4n requested review from dbkr and florianduros July 16, 2026 11:26
Comment thread src/client.ts
ara4n added 2 commits July 24, 2026 02:03
Evaluates org.matrix.mscxxxx.recipient_permission (stable:
recipient_permission): matches iff we (the user the rules are evaluated
for) have a power level >= that required for the power-levels action
named by `key`. Server-side (synapse) this drives the new default
.org.matrix.mscxxxx.rule.knock override rule so users who can accept a
knock are pushed; client-side support is needed because Element Web
re-evaluates server-supplied rules locally via PushProcessor, which
fails rules containing unknown condition kinds.
The knock push rules MSC has been published as MSC4506: rename the
condition kind to org.matrix.msc4506.recipient_permission and the
unstable rule id to .org.matrix.msc4506.rule.knock per its unstable
prefix section.
Comment thread src/pushprocessor.ts
* required to perform the `m.room.power_levels` action named by `key`
* (e.g. "invite"), in the room the event is in.
*/
private eventFulfillsRecipientPermCondition(cond: IRecipientPermissionCondition, ev: MatrixEvent): boolean {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be gated behind an opt-in as it is relying on an MSC.

@t3chguy
t3chguy marked this pull request as draft August 6, 2026 09:07
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