mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-24 02:25:45 +03:00
spaces
This commit is contained in:
parent
289a249874
commit
2cfdfee572
1 changed files with 2 additions and 2 deletions
|
@ -346,7 +346,7 @@ def _priority_class_to_template_name(pc):
|
||||||
def _rule_to_template(rule):
|
def _rule_to_template(rule):
|
||||||
template_name = _priority_class_to_template_name(rule['priority_class'])
|
template_name = _priority_class_to_template_name(rule['priority_class'])
|
||||||
if template_name in ['override', 'underride']:
|
if template_name in ['override', 'underride']:
|
||||||
return {k:rule[k] for k in ["rule_id", "conditions", "actions"]}
|
return {k: rule[k] for k in ["rule_id", "conditions", "actions"]}
|
||||||
elif template_name in ["sender", "room"]:
|
elif template_name in ["sender", "room"]:
|
||||||
return {k: rule[k] for k in ["rule_id", "actions"]}
|
return {k: rule[k] for k in ["rule_id", "actions"]}
|
||||||
elif template_name == 'content':
|
elif template_name == 'content':
|
||||||
|
@ -355,7 +355,7 @@ def _rule_to_template(rule):
|
||||||
thecond = rule["conditions"][0]
|
thecond = rule["conditions"][0]
|
||||||
if "pattern" not in thecond:
|
if "pattern" not in thecond:
|
||||||
return None
|
return None
|
||||||
ret = {k:rule[k] for k in ["rule_id", "actions"]}
|
ret = {k: rule[k] for k in ["rule_id", "actions"]}
|
||||||
ret["pattern"] = thecond["pattern"]
|
ret["pattern"] = thecond["pattern"]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue