Skip to content
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

Spec compliance: default push rule order is wrong #17039

Closed
t3chguy opened this issue Mar 28, 2024 · 0 comments · Fixed by #17043
Closed

Spec compliance: default push rule order is wrong #17039

t3chguy opened this issue Mar 28, 2024 · 0 comments · Fixed by #17043

Comments

@t3chguy
Copy link
Member

t3chguy commented Mar 28, 2024

Description

The spec lists the following default underride rules in order https://spec.matrix.org/v1.10/client-server-api/#default-underride-rules

.m.rule.call
.m.rule.encrypted_room_one_to_one
.m.rule.room_one_to_one
...

Synapse has rules 2 and 3 reversed. I did not extensively check if this is the only instance of this misordering.

PushRule {
rule_id: Cow::Borrowed("global/underride/.m.rule.room_one_to_one"),
priority_class: 1,
conditions: Cow::Borrowed(&[
Condition::Known(KnownCondition::EventMatch(EventMatchCondition {
key: Cow::Borrowed("type"),
pattern: Cow::Borrowed("m.room.message"),
})),
Condition::Known(KnownCondition::RoomMemberCount {
is: Some(Cow::Borrowed("2")),
}),
]),
actions: Cow::Borrowed(&[Action::Notify, SOUND_ACTION, HIGHLIGHT_FALSE_ACTION]),
default: true,
default_enabled: true,
},
PushRule {
rule_id: Cow::Borrowed("global/underride/.m.rule.encrypted_room_one_to_one"),
priority_class: 1,
conditions: Cow::Borrowed(&[
Condition::Known(KnownCondition::EventMatch(EventMatchCondition {
key: Cow::Borrowed("type"),
pattern: Cow::Borrowed("m.room.encrypted"),
})),
Condition::Known(KnownCondition::RoomMemberCount {
is: Some(Cow::Borrowed("2")),
}),
]),
actions: Cow::Borrowed(&[Action::Notify, SOUND_ACTION, HIGHLIGHT_FALSE_ACTION]),
default: true,
default_enabled: true,
},

Steps to reproduce

Inspect response from GET /pushrules

Homeserver

element.io

Synapse Version

Unknown

Installation Method

I don't know

Database

Unknown

Workers

I don't know

Platform

Unknown

Configuration

Unknown

Relevant log output

Unknown

Anything else that would be useful to know?

No response

@t3chguy t3chguy changed the title Spec compliance, push rule order is wrong Spec compliance: default push rule order is wrong Mar 28, 2024
Sumpy1 added a commit to Sumpy1/synapse that referenced this issue Apr 1, 2024
anoadragon453 pushed a commit that referenced this issue Apr 9, 2024
Co-authored-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
hughns pushed a commit to hughns/synapse that referenced this issue Apr 9, 2024
Co-authored-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant