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

MSC3887: List matching push rules #3887

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions proposals/3887-push-rule-list-matching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# MSC3887: List matching push rules

This MSC proposes a way to match against a list within event content.
[MSC1796](https://github.com/matrix-org/matrix-spec-proposals/pull/1796) is an example change that
would require this list matching.


## Proposals

### Handling of lists within event data

We propose that conditons simply match any value within a list. Conditions should be evaluated against
every item in the list and return a match if any of the items meet the condition. This is compatible
with [all condition types](https://spec.matrix.org/v1.3/client-server-api/#conditions-1). For example an event:

```json
{
"content": {
"mentions": ["@user-a:beeper.com", "@user-b:beeper.com"]
}
}
```

The following condition would match:

```json
{
"kind": "event_match",
"key": "event.content.mentions",
"value": "@user-a:beeper.com"
}
```


## Alternatives

A new condition kind designed specifically for matching against lists could provide more options, such
as specifying if one, all or some items must match.

TODO: consider use-cases different to the example that would require more in-depth forms of matching.


## Security considerations

None.


## Unstable prefix

Not required.