From b7a6e8f7b52c366cbcb6ed8577e0d12b6e99cf0d Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 2 Feb 2015 16:25:53 +0000 Subject: [PATCH] Finish non-API doc parts of push rules. --- drafts/push_csapi.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drafts/push_csapi.rst b/drafts/push_csapi.rst index 89212576..bd204389 100644 --- a/drafts/push_csapi.rst +++ b/drafts/push_csapi.rst @@ -60,7 +60,9 @@ Override Rules The highest priority rules are user-configured overrides. Content Rules These configure behaviour for (unencrypted) messages that match certain - patterns. + patterns. Content rules take one parameter, 'pattern', that gives the pattern + to match against. This is treated in the same way as pattern for event_match + conditions, below. Room Rules These change the behaviour of all messages to a given room. The rule_id of a room rule is always the room that it affects. @@ -100,6 +102,8 @@ be redundant. Actions for the highest priority rule and only that rule apply (for example, a set_sound action in a lower priority rule will not apply if a higher priority rule matches, even if that rule does not specify a sound). +Rules also have an identifier, rule_id, which is a string. + Push Rules: Actions: -------------------- All rules have an associated list of 'actions'. An action affects if and how a @@ -155,3 +159,8 @@ room_member_count this matches rooms where the member count is exactly equal to the given number (ie. the same as '=='). +Room, Sender, User and Content rules do not have conditions in the same way, +but instead have predefined conditions, the behaviour of which can be configured +using parameters named as described above. In the cases of room and sender +rules, the rule_id of the rule determines its behaviour. +