mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-08 06:41:53 +00:00
Always send default and rule_id to clients (#13904)
This commit is contained in:
parent
73ecff7e9e
commit
99a7e7e023
1
changelog.d/13904.bugfix
Normal file
1
changelog.d/13904.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix a bug introduced in 1.66 where some required fields in the pushrules sent to clients were not present anymore. Contributed by Nico.
|
@ -102,10 +102,8 @@ def _rule_to_template(rule: PushRule) -> Optional[Dict[str, Any]]:
|
|||||||
# with PRIORITY_CLASS_INVERSE_MAP.
|
# with PRIORITY_CLASS_INVERSE_MAP.
|
||||||
raise ValueError("Unexpected template_name: %s" % (template_name,))
|
raise ValueError("Unexpected template_name: %s" % (template_name,))
|
||||||
|
|
||||||
if unscoped_rule_id:
|
templaterule["rule_id"] = unscoped_rule_id
|
||||||
templaterule["rule_id"] = unscoped_rule_id
|
templaterule["default"] = rule.default
|
||||||
if rule.default:
|
|
||||||
templaterule["default"] = True
|
|
||||||
return templaterule
|
return templaterule
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user