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

Attempt to clarify how event_match works #3690

Merged
merged 4 commits into from
Feb 17, 2022
Merged

Attempt to clarify how event_match works #3690

merged 4 commits into from
Feb 17, 2022

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Feb 1, 2022

Comment on lines +216 to +221
Unrecognised conditions MUST NOT match any events, effectively making
the push rule disabled.

`room`, `sender` and `content` rules do not have conditions in the same
way, but instead have predefined conditions. In the cases of `room` and
`sender` rules, the `rule_id` of the rule determines its behaviour.
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 moved this stuff up from the bottom, because it seemed to be a bit lost under the sender_notification_permission definition.

(We seem to have lost the definition list formatting that the r0 spec used to use. I wonder if there are better ways to solve this.)

Copy link
Member

Choose a reason for hiding this comment

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

Definition list formatting is probably something we can fix with writing style rather than formatting. We can discuss that elsewhere though.

Comment on lines +241 to +242
* The character `*` matches zero or more characters.
* `?` matches exactly one character.
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically speaking, synapse allows you to specify a character range, with [a-z]. However, I can't see an occasion where that would ever be useful, and I'm more inclined to treat it as a synapse bug.

(I note that we don't specify character ranges for server_acls, where it also supports them)

@richvdh richvdh requested a review from a team February 1, 2022 16:50
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

overall seems fine. The only review comment I'm really concerned with is the one to remind readers that they need to match all the parts of the event (including state_key) if they want to match a specific event type.

content/client-server-api/modules/push.md Outdated Show resolved Hide resolved
content/client-server-api/modules/push.md Show resolved Hide resolved
Comment on lines +216 to +221
Unrecognised conditions MUST NOT match any events, effectively making
the push rule disabled.

`room`, `sender` and `content` rules do not have conditions in the same
way, but instead have predefined conditions. In the cases of `room` and
`sender` rules, the `rule_id` of the rule determines its behaviour.
Copy link
Member

Choose a reason for hiding this comment

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

Definition list formatting is probably something we can fix with writing style rather than formatting. We can discuss that elsewhere though.

@@ -481,7 +486,7 @@ Definition:
}
```

**`.m.rule.tombstone`**
**<a name="mruletombstone"></a>`.m.rule.tombstone`**
Copy link
Member

Choose a reason for hiding this comment

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

screen readers will have a hard time with this, but I'm happy to have this be converted into an issue instead of being fixed in this PR if you'd like though.

Copy link
Member Author

Choose a reason for hiding this comment

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

hrm, sorry, I'm not up to date on how best to support screenreaders. My assumption was that an anchor like this would be very common, and ignored. Is there a better way of doing this?

Copy link
Member

Choose a reason for hiding this comment

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

Fixing our heading structure so these become actual headings (and therefore implicit anchors we can use) would work best, but failing that we'd want to give some content to this like the permalink icons found other headings.

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'm kinda struggling to envisage what exactly the failure mode is going to be here - if you have a clear idea, perhaps you could open an issue yourself?

I'm going to go ahead and merge this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants