Skip to content

Commit c43ca16

Browse files
committed
Remove unstable support for MSC2732
This MSC was accepted in 2022. We shouldn't need to continue supporting the unstable endpoint. Removing this saves us from needing to support it in the pydantic model (which is much easier in pydantic v2 than v1).
1 parent 47a0970 commit c43ca16

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

synapse/rest/client/sync.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,6 @@ async def encode_response(
363363

364364
# https://github.com/matrix-org/matrix-doc/blob/54255851f642f84a4f1aaf7bc063eebe3d76752b/proposals/2732-olm-fallback-keys.md
365365
# states that this field should always be included, as long as the server supports the feature.
366-
response["org.matrix.msc2732.device_unused_fallback_key_types"] = (
367-
sync_result.device_unused_fallback_key_types
368-
)
369366
response["device_unused_fallback_key_types"] = (
370367
sync_result.device_unused_fallback_key_types
371368
)

tests/handlers/test_e2e_keys.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ def test_fallback_key(self) -> None:
410410
device_id = "xyz"
411411
fallback_key = {"alg1:k1": "fallback_key1"}
412412
fallback_key2 = {"alg1:k2": "fallback_key2"}
413-
fallback_key3 = {"alg1:k2": "fallback_key3"}
414413
otk = {"alg1:k2": "key2"}
415414

416415
# we shouldn't have any unused fallback keys yet
@@ -531,28 +530,6 @@ def test_fallback_key(self) -> None:
531530
{"failures": {}, "one_time_keys": {local_user: {device_id: fallback_key2}}},
532531
)
533532

534-
# using the unstable prefix should also set the fallback key
535-
self.get_success(
536-
self.handler.upload_keys_for_user(
537-
local_user,
538-
device_id,
539-
{"org.matrix.msc2732.fallback_keys": fallback_key3},
540-
)
541-
)
542-
543-
claim_res = self.get_success(
544-
self.handler.claim_one_time_keys(
545-
{local_user: {device_id: {"alg1": 1}}},
546-
self.requester,
547-
timeout=None,
548-
always_include_fallback_keys=False,
549-
)
550-
)
551-
self.assertEqual(
552-
claim_res,
553-
{"failures": {}, "one_time_keys": {local_user: {device_id: fallback_key3}}},
554-
)
555-
556533
def test_fallback_key_bulk(self) -> None:
557534
"""Like test_fallback_key, but claims multiple keys in one handler call."""
558535
alice = f"@alice:{self.hs.hostname}"

0 commit comments

Comments
 (0)