Merge pull request #373 from matrix-org/dbkr/contains_display_name_override
Make the display name rule an override rule
This commit is contained in:
commit
fd888fcbda
2 changed files with 39 additions and 31 deletions
|
@ -1,6 +1,14 @@
|
||||||
<Unreleased changes>
|
<Unreleased changes>
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
- Breaking changes:
|
||||||
|
|
||||||
|
- Change the rule kind of `.m.rule.contains_display_name` from
|
||||||
|
`underride` to `override`. This works with all known clients
|
||||||
|
which support push rules, but any other clients implementing
|
||||||
|
the push rules API should be aware of this change. This
|
||||||
|
makes it simple to mute rooms correctly in the API.
|
||||||
|
|
||||||
- Spec clarifications:
|
- Spec clarifications:
|
||||||
|
|
||||||
- Spell out the way that state is handled by ``POST /createRoom``
|
- Spell out the way that state is handled by ``POST /createRoom``
|
||||||
|
|
|
@ -327,6 +327,37 @@ Definition:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
``.m.rule.contains_display_name``
|
||||||
|
`````````````````````````````````
|
||||||
|
Matches any message whose content is unencrypted and contains the user's
|
||||||
|
current display name in the room in which it was sent.
|
||||||
|
|
||||||
|
Definition:
|
||||||
|
|
||||||
|
.. code:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"rule_id": ".m.rule.contains_display_name",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"kind": "contains_display_name"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": [
|
||||||
|
"notify",
|
||||||
|
{
|
||||||
|
"set_tweak": "sound",
|
||||||
|
"value": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"set_tweak": "highlight"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Default Content Rules
|
Default Content Rules
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -388,37 +419,6 @@ Definition:
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
``.m.rule.contains_display_name``
|
|
||||||
`````````````````````````````````
|
|
||||||
Matches any message whose content is unencrypted and contains the user's
|
|
||||||
current display name in the room in which it was sent.
|
|
||||||
|
|
||||||
Definition:
|
|
||||||
|
|
||||||
.. code:: json
|
|
||||||
|
|
||||||
{
|
|
||||||
"rule_id": ".m.rule.contains_display_name",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"conditions": [
|
|
||||||
{
|
|
||||||
"kind": "contains_display_name"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"actions": [
|
|
||||||
"notify",
|
|
||||||
{
|
|
||||||
"set_tweak": "sound",
|
|
||||||
"value": "default"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"set_tweak": "highlight"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
``.m.rule.room_one_to_one``
|
``.m.rule.room_one_to_one``
|
||||||
```````````````````````````
|
```````````````````````````
|
||||||
Matches any message sent in a room with exactly two members.
|
Matches any message sent in a room with exactly two members.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue