summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-07-23 09:03:19 +0100
committerErik Johnston <erik@matrix.org>2021-07-23 09:03:19 +0100
commit683deee9a4be8400e72bb2de87b82912656597ac (patch)
treebedb7d836b7e395fb5cb59932f5586b7c90f6ab1 /synapse
parentDisable msc2716 until Complement update is merged (#10463) (diff)
parentMerge tag 'v1.38.1' (diff)
downloadsynapse-683deee9a4be8400e72bb2de87b82912656597ac.tar.xz
Merge branch 'master' into develop
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/client/v2_alpha/sync.py11
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 7bb4e6b8aa..e321668698 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"