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>
This commit is contained in:
Jeyachandran Rathnam 2023-01-09 12:17:24 -05:00 committed by GitHub
parent c7b2c31161
commit 58d2adc3da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

1
changelog.d/14727.bugfix Normal file
View File

@ -0,0 +1 @@
Remove the unspecced `device` field from `/pushrules` responses.

View File

@ -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"])