Commit 4565063e authored by Erik Johnston's avatar Erik Johnston
Browse files

Merge commit '7da24b97' into release-v1.39

parents c6509991 7da24b97
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.
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment