mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 09:09:25 -05:00
SYN-267 Add a fallback rule as an explicit server default rule and make the default dont-notify so you effectively have a "notify for everything else" switch you can turn on and off.
This commit is contained in:
parent
1959088156
commit
cfac3b7873
@ -32,7 +32,7 @@ class Pusher(object):
|
|||||||
INITIAL_BACKOFF = 1000
|
INITIAL_BACKOFF = 1000
|
||||||
MAX_BACKOFF = 60 * 60 * 1000
|
MAX_BACKOFF = 60 * 60 * 1000
|
||||||
GIVE_UP_AFTER = 24 * 60 * 60 * 1000
|
GIVE_UP_AFTER = 24 * 60 * 60 * 1000
|
||||||
DEFAULT_ACTIONS = ['notify']
|
DEFAULT_ACTIONS = ['dont-notify']
|
||||||
|
|
||||||
INEQUALITY_EXPR = re.compile("^([=<>]*)([0-9]*)$")
|
INEQUALITY_EXPR = re.compile("^([=<>]*)([0-9]*)$")
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ def make_base_rules(user, kind):
|
|||||||
|
|
||||||
if kind == 'override':
|
if kind == 'override':
|
||||||
rules = make_base_override_rules()
|
rules = make_base_override_rules()
|
||||||
|
elif kind == 'underride':
|
||||||
|
rules = make_base_underride_rules()
|
||||||
elif kind == 'content':
|
elif kind == 'content':
|
||||||
rules = make_base_content_rules(user)
|
rules = make_base_content_rules(user)
|
||||||
|
|
||||||
@ -98,3 +100,16 @@ def make_base_override_rules():
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def make_base_underride_rules():
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
'rule_id': 'global/underride/.m.rule.fallback',
|
||||||
|
'conditions': [
|
||||||
|
],
|
||||||
|
'actions': [
|
||||||
|
'notify',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user