diff options
author | Richard van der Hoff <richard@matrix.org> | 2021-07-23 00:43:53 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2021-07-23 00:43:53 +0100 |
commit | 016f085722666ac68d2e4b4f21793db399203ea9 (patch) | |
tree | de40ce47ba1fc673b8c0d85a4570170548278341 /synapse/rest/client | |
parent | Make deprecation notice of the spam checker doc more obvious (#10395) (diff) | |
parent | 1.38.1 (diff) | |
download | synapse-016f085722666ac68d2e4b4f21793db399203ea9.tar.xz |
Merge tag 'v1.38.1'
Synapse 1.38.1 (2021-07-22) =========================== Bugfixes -------- - Always include `device_one_time_keys_count` key in `/sync` response to work around a bug in Element Android that broke encryption for new devices. ([\#10457](https://github.com/matrix-org/synapse/issues/10457))
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/v2_alpha/sync.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py index ecbbcf3851..32e8500795 100644 --- a/synapse/rest/client/v2_alpha/sync.py +++ b/synapse/rest/client/v2_alpha/sync.py @@ -252,10 +252,13 @@ class SyncRestServlet(RestServlet): if sync_result.device_lists.left: response["device_lists"]["left"] = list(sync_result.device_lists.left) - if sync_result.device_one_time_keys_count: - response[ - "device_one_time_keys_count" - ] = sync_result.device_one_time_keys_count + # We always include this because https://github.com/vector-im/element-android/issues/3725 + # The spec isn't terribly clear on when this can be omitted and how a client would tell + # the difference between "no keys present" and "nothing changed" in terms of whole field + # absent / individual key type entry absent + # Corresponding synapse issue: https://github.com/matrix-org/synapse/issues/10456 + response["device_one_time_keys_count"] = sync_result.device_one_time_keys_count + if sync_result.device_unused_fallback_key_types: response[ "org.matrix.msc2732.device_unused_fallback_key_types" |