summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2021-12-09 06:41:27 -0500
committerGitHub <noreply@github.com>2021-12-09 11:41:27 +0000
commitb47d10dc46e4644c432f017d5b2129ff7a349166 (patch)
treea19e91f18765e1856104b6bc328398bfeb43a049 /synapse
parentAdd missing `errcode` to `parse_string` and `parse_boolean` (#11542) (diff)
downloadsynapse-b47d10dc46e4644c432f017d5b2129ff7a349166.tar.xz
Support unprefixed versions of fallback key property names. (#11541)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/e2e_keys.py4
-rw-r--r--synapse/rest/client/sync.py3
2 files changed, 6 insertions, 1 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py
index b2554bda04..14360b4e40 100644
--- a/synapse/handlers/e2e_keys.py
+++ b/synapse/handlers/e2e_keys.py
@@ -580,7 +580,9 @@ class E2eKeysHandler:
             log_kv(
                 {"message": "Did not update one_time_keys", "reason": "no keys given"}
             )
-        fallback_keys = keys.get("org.matrix.msc2732.fallback_keys", None)
+        fallback_keys = keys.get("fallback_keys") or keys.get(
+            "org.matrix.msc2732.fallback_keys"
+        )
         if fallback_keys and isinstance(fallback_keys, dict):
             log_kv(
                 {
diff --git a/synapse/rest/client/sync.py b/synapse/rest/client/sync.py
index 88e4f5e063..dd90ffa123 100644
--- a/synapse/rest/client/sync.py
+++ b/synapse/rest/client/sync.py
@@ -293,6 +293,9 @@ class SyncRestServlet(RestServlet):
         response[
             "org.matrix.msc2732.device_unused_fallback_key_types"
         ] = sync_result.device_unused_fallback_key_types
+        response[
+            "device_unused_fallback_key_types"
+        ] = sync_result.device_unused_fallback_key_types
 
         if joined:
             response["rooms"][Membership.JOIN] = joined