Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 58d2adc

Browse files
JeyRathnamDavid Robertson
andauthored
Remove undocumented device from pushrules (matrix-org#14727)
* Remove undocumented device from pushrules * Add changelog * Update changelog.d/14727.misc * Rename 14727.misc to 14727.bugfix Co-authored-by: David Robertson <[email protected]>
1 parent c7b2c31 commit 58d2adc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

changelog.d/14727.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove the unspecced `device` field from `/pushrules` responses.

synapse/push/clientformat.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ def format_push_rules_for_user(
2626
"""Converts a list of rawrules and a enabled map into nested dictionaries
2727
to match the Matrix client-server format for push rules"""
2828

29-
rules: Dict[str, Dict[str, List[Dict[str, Any]]]] = {
30-
"global": {},
31-
"device": {},
32-
}
29+
rules: Dict[str, Dict[str, List[Dict[str, Any]]]] = {"global": {}}
3330

3431
rules["global"] = _add_empty_priority_class_arrays(rules["global"])
3532

0 commit comments

Comments
 (0)