Update push rule definitions.

This commit is contained in:
Patrick Cloke 2023-05-02 13:04:39 -04:00
parent e1dc5f8f53
commit 3b036aefbb

View file

@ -521,8 +521,43 @@ Definition:
}
```
**`.m.rule.is_user_mention`**
Matches any message which contains the user's Matrix ID in the list of `user_ids`
under the `m.mentions` property.
Definition:
```json
{
"rule_id": ".m.rule.is_user_mention",
"default": true,
"enabled": true,
"conditions": [
{
"kind": "event_property_contains",
"key": "content.m\\.mentions.user_ids",
"value": "[the user's Matrix ID]"
}
],
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight"
}
]
}
```
**`.m.rule.contains_display_name`**
As of `v1.7`, this rule is deprecated and should only be enabled if the event
does not have an `m.mentions` property.
Matches any message whose content contains the user's current display name
in the room in which it was sent.
@ -551,8 +586,43 @@ Definition:
}
```
**`.m.rule.is_room_mention`**
Matches any message from a sender with the proper power level with the `room`
property of the `m.mentions` property set to `true`.
Definition:
```json
{
"rule_id": ".m.rule.is_room_mention",
"default": true,
"enabled": true,
"conditions": [
{
"kind": "event_property_is",
"key": "content.m\\.mentions.room",
"value": true
},
{
"kind": "sender_notification_permission",
"key": "room"
}
],
"actions": [
"notify",
{
"set_tweak": "highlight"
}
]
}
```
**`.m.rule.roomnotif`**
As of `v1.7`, this rule is deprecated and should only be enabled if the event
does not have an `m.mentions` property.
Matches any message from a sender with the proper power level whose content
contains the text `@room`, signifying the whole room should be notified of
the event.
@ -676,6 +746,9 @@ Definition:
**`.m.rule.contains_user_name`**
As of `v1.7`, this rule is deprecated and should only be enabled if the event
does not have an `m.mentions` property.
Matches any message whose content contains the local part of the user's
Matrix ID, separated by word boundaries.