diff options
author | Jeyachandran Rathnam <jai.rathnem@gmail.com> | 2023-01-09 12:17:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 17:17:24 +0000 |
commit | 58d2adc3da6a988452dbb9c6c4202a5ea19c4ca9 (patch) | |
tree | c6703d27776d2cb7c1c0d40824940a78680b2f4c | |
parent | Update link to towncrier in contribution guide (#14801) (diff) | |
download | synapse-58d2adc3da6a988452dbb9c6c4202a5ea19c4ca9.tar.xz |
Remove undocumented device from pushrules (#14727)
* Remove undocumented device from pushrules * Add changelog * Update changelog.d/14727.misc * Rename 14727.misc to 14727.bugfix Co-authored-by: David Robertson <davidr@element.io>
Diffstat (limited to '')
-rw-r--r-- | changelog.d/14727.bugfix | 1 | ||||
-rw-r--r-- | synapse/push/clientformat.py | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/changelog.d/14727.bugfix b/changelog.d/14727.bugfix new file mode 100644 index 0000000000..25079496e4 --- /dev/null +++ b/changelog.d/14727.bugfix @@ -0,0 +1 @@ +Remove the unspecced `device` field from `/pushrules` responses. diff --git a/synapse/push/clientformat.py b/synapse/push/clientformat.py index 622a1e35c5..bb76c169c6 100644 --- a/synapse/push/clientformat.py +++ b/synapse/push/clientformat.py @@ -26,10 +26,7 @@ def format_push_rules_for_user( """Converts a list of rawrules and a enabled map into nested dictionaries to match the Matrix client-server format for push rules""" - rules: Dict[str, Dict[str, List[Dict[str, Any]]]] = { - "global": {}, - "device": {}, - } + rules: Dict[str, Dict[str, List[Dict[str, Any]]]] = {"global": {}} rules["global"] = _add_empty_priority_class_arrays(rules["global"]) |