|
|
|
@ -183,25 +183,14 @@ dictionary with a `set_tweak` key whose value is the name of the tweak
|
|
|
|
|
to set. It may also have a `value` key which is the value to which it
|
|
|
|
|
should be set.
|
|
|
|
|
|
|
|
|
|
Actions that have no parameters are represented as a string. Otherwise,
|
|
|
|
|
they are represented as a dictionary with a key equal to their name and
|
|
|
|
|
other keys as their parameters, e.g.
|
|
|
|
|
`{ "set_tweak": "sound", "value": "default" }`
|
|
|
|
|
|
|
|
|
|
####### Tweaks
|
|
|
|
|
|
|
|
|
|
The `set_tweak` action is used to add an entry to the 'tweaks'
|
|
|
|
|
dictionary that is sent in the notification request to the Push Gateway.
|
|
|
|
|
The following tweaks are defined:
|
|
|
|
|
|
|
|
|
|
`sound`
|
|
|
|
|
A string representing the sound to be played when this notification
|
|
|
|
|
* `sound`: A string representing the sound to be played when this notification
|
|
|
|
|
arrives. A value of `default` means to play a default sound. A device
|
|
|
|
|
may choose to alert the user by some other means if appropriate, eg.
|
|
|
|
|
vibration.
|
|
|
|
|
|
|
|
|
|
`highlight`
|
|
|
|
|
A boolean representing whether or not this message should be highlighted
|
|
|
|
|
* `highlight`: A boolean representing whether or not this message should be highlighted
|
|
|
|
|
in the UI. This will normally take the form of presenting the message in
|
|
|
|
|
a different colour and/or style. The UI might also be adjusted to draw
|
|
|
|
|
particular attention to the room in which the event occurred. If a
|
|
|
|
@ -214,6 +203,11 @@ applications and Push Gateways may agree on additional tweaks. For
|
|
|
|
|
example, a tweak may be added to specify how to flash the notification
|
|
|
|
|
light on a mobile device.
|
|
|
|
|
|
|
|
|
|
Actions that have no parameters are represented as a string. Otherwise,
|
|
|
|
|
they are represented as a dictionary with a key equal to their name and
|
|
|
|
|
other keys as their parameters, e.g.
|
|
|
|
|
`{ "set_tweak": "sound", "value": "default" }`
|
|
|
|
|
|
|
|
|
|
###### Conditions
|
|
|
|
|
|
|
|
|
|
`override` and `underride` rules MAY have a list of 'conditions'. All
|
|
|
|
@ -265,22 +259,22 @@ the push rule disabled.
|
|
|
|
|
way, but instead have predefined conditions. In the cases of `room` and
|
|
|
|
|
`sender` rules, the `rule_id` of the rule determines its behaviour.
|
|
|
|
|
|
|
|
|
|
###### Predefined Rules
|
|
|
|
|
##### Predefined Rules
|
|
|
|
|
|
|
|
|
|
Homeservers can specify "server-default rules" which operate at a lower
|
|
|
|
|
priority than "user-defined rules". The `rule_id` for all server-default
|
|
|
|
|
rules MUST start with a dot (".") to identify them as "server-default".
|
|
|
|
|
The following server-default rules are specified:
|
|
|
|
|
|
|
|
|
|
####### Default Override Rules
|
|
|
|
|
###### Default Override Rules
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.master`
|
|
|
|
|
**`.m.rule.master`**
|
|
|
|
|
|
|
|
|
|
Matches all events. This can be enabled to turn off all push
|
|
|
|
|
notifications other than those generated by override rules set by the
|
|
|
|
|
user. By default this rule is disabled.
|
|
|
|
|
|
|
|
|
|
Definition
|
|
|
|
|
Definition:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
@ -294,7 +288,7 @@ Definition
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.suppress_notices`
|
|
|
|
|
**`.m.rule.suppress_notices`**
|
|
|
|
|
|
|
|
|
|
Matches messages with a `msgtype` of `notice`.
|
|
|
|
|
|
|
|
|
@ -318,7 +312,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.invite_for_me`
|
|
|
|
|
**`.m.rule.invite_for_me`**
|
|
|
|
|
|
|
|
|
|
Matches any invites to a new room for this user.
|
|
|
|
|
|
|
|
|
@ -356,7 +350,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.member_event`
|
|
|
|
|
**`.m.rule.member_event`**
|
|
|
|
|
|
|
|
|
|
Matches any `m.room.member_event`.
|
|
|
|
|
|
|
|
|
@ -380,7 +374,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.contains_display_name`
|
|
|
|
|
**`.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.
|
|
|
|
@ -410,7 +404,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.tombstone`
|
|
|
|
|
**`.m.rule.tombstone`**
|
|
|
|
|
|
|
|
|
|
Matches any state event whose type is `m.room.tombstone`. This is
|
|
|
|
|
intended to notify users of a room when it is upgraded, similar to what
|
|
|
|
@ -444,7 +438,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.roomnotif`
|
|
|
|
|
**`.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.
|
|
|
|
@ -476,9 +470,9 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
####### Default Content Rules
|
|
|
|
|
###### Default Content Rules
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.contains_user_name`
|
|
|
|
|
**`.m.rule.contains_user_name`**
|
|
|
|
|
|
|
|
|
|
Matches any message whose content is unencrypted and contains the local
|
|
|
|
|
part of the user's Matrix ID, separated by word boundaries.
|
|
|
|
@ -504,9 +498,9 @@ Definition (as a `content` rule):
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
####### Default Underride Rules
|
|
|
|
|
###### Default Underride Rules
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.call`
|
|
|
|
|
**`.m.rule.call`**
|
|
|
|
|
|
|
|
|
|
Matches any incoming VOIP call.
|
|
|
|
|
|
|
|
|
@ -534,7 +528,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.encrypted_room_one_to_one`
|
|
|
|
|
**`.m.rule.encrypted_room_one_to_one`**
|
|
|
|
|
|
|
|
|
|
Matches any encrypted event sent in a room with exactly two members.
|
|
|
|
|
Unlike other push rules, this rule cannot be matched against the content
|
|
|
|
@ -570,7 +564,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.room_one_to_one`
|
|
|
|
|
**`.m.rule.room_one_to_one`**
|
|
|
|
|
|
|
|
|
|
Matches any message sent in a room with exactly two members.
|
|
|
|
|
|
|
|
|
@ -602,7 +596,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.message`
|
|
|
|
|
**`.m.rule.message`**
|
|
|
|
|
|
|
|
|
|
Matches all chat messages.
|
|
|
|
|
|
|
|
|
@ -626,7 +620,7 @@ Definition:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
######## `.m.rule.encrypted`
|
|
|
|
|
**`.m.rule.encrypted`**
|
|
|
|
|
|
|
|
|
|
Matches all encrypted events. Unlike other push rules, this rule cannot
|
|
|
|
|
be matched against the content of the event by nature of it being
|
|
|
|
|