Skip to content

Commit 5c268ef

Browse files
authored
Merge pull request #2020 from matrix-org/travis/1.0/msc1930-tombstone-notif
Add a .m.rule.tombstone default push rule for room upgrades
2 parents 434e238 + ceaccff commit 5c268ef

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a ``.m.rule.tombstone`` default push rule for room ugprade notifications.

specification/modules/push.rst

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ notification is delivered for a matching event. The following actions are define
177177
This prevents each matching event from generating a notification
178178
``coalesce``
179179
This enables notifications for matching events but activates homeserver
180-
specific behaviour to intelligently coalesce multiple events into a single
180+
specific behaviour to intelligently coalesce multiple events into a single
181181
notification. Not all homeservers may support this. Those that do not support
182182
it should treat it as the ``notify`` action.
183183
``set_tweak``
@@ -369,6 +369,37 @@ Definition:
369369
}
370370
371371
372+
``.m.rule.tombstone``
373+
`````````````````````
374+
Matches any event whose type is ``m.room.tombstone``. This is intended
375+
to notify users of a room when it is upgraded, similar to what an
376+
``@room`` notification would accomplish.
377+
378+
Definition:
379+
380+
.. code:: json
381+
382+
{
383+
"rule_id": ".m.rule.tombstone",
384+
"default": true,
385+
"enabled": true,
386+
"conditions": [
387+
{
388+
"kind": "event_match",
389+
"key": "type",
390+
"pattern": "m.room.tombstone"
391+
}
392+
],
393+
"actions": [
394+
"notify",
395+
{
396+
"set_tweak": "highlight",
397+
"value": true
398+
}
399+
]
400+
}
401+
402+
372403
``.m.rule.roomnotif``
373404
`````````````````````
374405
Matches any message whose content is unencrypted and contains the
@@ -599,7 +630,7 @@ Definition:
599630
Conditions
600631
++++++++++
601632

602-
Override, Underride and Default Rules MAY have a list of 'conditions'.
633+
Override, Underride and Default Rules MAY have a list of 'conditions'.
603634
All conditions must hold true for an event in order to apply the ``action`` for
604635
the event. A rule with no conditions always matches. Room, Sender, User and
605636
Content rules do not have conditions in the same way, but instead have

0 commit comments

Comments
 (0)