|
|
@ -369,6 +369,41 @@ Definition:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
``.m.rule.roomnotif``
|
|
|
|
|
|
|
|
`````````````````````````````````
|
|
|
|
|
|
|
|
Matches any message whose content is unencrypted and contains the
|
|
|
|
|
|
|
|
text ``@room``, signifying the whole room should be notified of
|
|
|
|
|
|
|
|
the event.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. code:: json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"rule_id": ".m.rule.roomnotif",
|
|
|
|
|
|
|
|
"default": true,
|
|
|
|
|
|
|
|
"enabled": true,
|
|
|
|
|
|
|
|
"conditions": [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"kind": "event_match",
|
|
|
|
|
|
|
|
"key": "content.body",
|
|
|
|
|
|
|
|
"pattern": "@room"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"kind": "sender_notification_permission",
|
|
|
|
|
|
|
|
"key": "room"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
"actions": [
|
|
|
|
|
|
|
|
"notify",
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"set_tweak": "highlight",
|
|
|
|
|
|
|
|
"value": true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Default Content Rules
|
|
|
|
Default Content Rules
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
@ -428,7 +463,38 @@ Definition:
|
|
|
|
"value": false
|
|
|
|
"value": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
``.m.rule.encrypted_room_one_to_one``
|
|
|
|
|
|
|
|
```````````````````````````
|
|
|
|
|
|
|
|
Matches any encrypted event sent in a room with exactly two members.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. code:: json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"rule_id": ".m.rule.encrypted_room_one_to_one",
|
|
|
|
|
|
|
|
"default": true,
|
|
|
|
|
|
|
|
"enabled": true,
|
|
|
|
|
|
|
|
"conditions": [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"kind": "room_member_count",
|
|
|
|
|
|
|
|
"is": "2"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
"actions": [
|
|
|
|
|
|
|
|
"notify",
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"set_tweak": "sound",
|
|
|
|
|
|
|
|
"value": "default"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"set_tweak": "highlight",
|
|
|
|
|
|
|
|
"value": false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
``.m.rule.room_one_to_one``
|
|
|
|
``.m.rule.room_one_to_one``
|
|
|
|
```````````````````````````
|
|
|
|
```````````````````````````
|
|
|
@ -446,6 +512,11 @@ Definition:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"kind": "room_member_count",
|
|
|
|
"kind": "room_member_count",
|
|
|
|
"is": "2"
|
|
|
|
"is": "2"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"kind": "event_match",
|
|
|
|
|
|
|
|
"key": "type",
|
|
|
|
|
|
|
|
"pattern": "m.room.encrypted"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"actions": [
|
|
|
|
"actions": [
|
|
|
@ -489,6 +560,34 @@ Definition:
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
``.m.rule.encrypted``
|
|
|
|
|
|
|
|
```````````````````
|
|
|
|
|
|
|
|
Matches all encrypted events.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. code:: json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"rule_id": ".m.rule.encrypted",
|
|
|
|
|
|
|
|
"default": true,
|
|
|
|
|
|
|
|
"enabled": true,
|
|
|
|
|
|
|
|
"conditions": [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"kind": "event_match",
|
|
|
|
|
|
|
|
"key": "type",
|
|
|
|
|
|
|
|
"pattern": "m.room.encrypted"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
"actions": [
|
|
|
|
|
|
|
|
"notify",
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"set_tweak": "highlight",
|
|
|
|
|
|
|
|
"value": false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Conditions
|
|
|
|
Conditions
|
|
|
|
++++++++++
|
|
|
|
++++++++++
|
|
|
@ -523,6 +622,21 @@ rule determines its behaviour. The following conditions are defined:
|
|
|
|
count is strictly less than the given number and so forth. If no prefix is
|
|
|
|
count is strictly less than the given number and so forth. If no prefix is
|
|
|
|
present, this parameter defaults to ``==``.
|
|
|
|
present, this parameter defaults to ``==``.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
``sender_notification_permission``
|
|
|
|
|
|
|
|
This takes into account the current power levels in the room, ensuring the
|
|
|
|
|
|
|
|
sender of the event has high enough power to trigger the notification.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* ``key``: The notification power level to require the sender to have. Refer to
|
|
|
|
|
|
|
|
the `m.room.power_levels`_ event schema for information about what the defaults
|
|
|
|
|
|
|
|
are and how to interpret the event. The ``key`` is used to look up a specific
|
|
|
|
|
|
|
|
notification type from the ``notifications`` object in the power level event
|
|
|
|
|
|
|
|
content.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Unrecognised conditions MUST NOT match any events, effectively making the push
|
|
|
|
|
|
|
|
rule disabled.
|
|
|
|
|
|
|
|
|
|
|
|
Push Rules: API
|
|
|
|
Push Rules: API
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|