0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-16 15:01:23 +01:00

MSC3202: Fix device_unused_fallback_keys -> device_unused_fallback_key_types (#12520)

* Fix device_unused_fallback_keys -> device_unused_fallback_key_types

* changelog
This commit is contained in:
Will Hunt 2022-04-22 16:03:46 +01:00 committed by GitHub
parent f46b223354
commit b82fff66df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

1
changelog.d/12520.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a bug in the implementation of MSC3202 where Synapse would use the field name `device_unused_fallback_keys`, rather than `device_unused_fallback_key_types`.

View file

@ -42,7 +42,7 @@ logger = logging.getLogger(__name__)
# user ID -> {device ID -> {algorithm -> count}} # user ID -> {device ID -> {algorithm -> count}}
TransactionOneTimeKeyCounts = Dict[str, Dict[str, Dict[str, int]]] TransactionOneTimeKeyCounts = Dict[str, Dict[str, Dict[str, int]]]
# Type for the `device_unused_fallback_keys` field in an appservice transaction # Type for the `device_unused_fallback_key_types` field in an appservice transaction
# user ID -> {device ID -> [algorithm]} # user ID -> {device ID -> [algorithm]}
TransactionUnusedFallbackKeys = Dict[str, Dict[str, List[str]]] TransactionUnusedFallbackKeys = Dict[str, Dict[str, List[str]]]

View file

@ -278,7 +278,7 @@ class ApplicationServiceApi(SimpleHttpClient):
] = one_time_key_counts ] = one_time_key_counts
if unused_fallback_keys: if unused_fallback_keys:
body[ body[
"org.matrix.msc3202.device_unused_fallback_keys" "org.matrix.msc3202.device_unused_fallback_key_types"
] = unused_fallback_keys ] = unused_fallback_keys
if device_list_summary: if device_list_summary:
body["org.matrix.msc3202.device_lists"] = { body["org.matrix.msc3202.device_lists"] = {