Add the master push rule for the break-my-push button. Allow server default rules to be disabled by default.

This commit is contained in:
David Baker 2015-03-10 17:26:25 +00:00
parent 8916acbc13
commit 04f8478aaa
4 changed files with 63 additions and 33 deletions

View file

@ -105,7 +105,11 @@ class Pusher(object):
room_member_count += 1
for r in rules:
if r['rule_id'] in enabled_map and not enabled_map[r['rule_id']]:
if r['rule_id'] in enabled_map:
r['enabled'] = enabled_map[r['rule_id']]
elif 'enabled' not in r:
r['enabled'] = True
if not r['enabled']:
continue
matches = True