From a0dc0fd8b953b980ade7b233cc8914f0d622d418 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Wed, 12 Nov 2025 15:08:43 +0100 Subject: [PATCH] Clarify that device_one_time_keys_count is only optional if no unclaimed one-time keys exist Fixes: #1057 Signed-off-by: Johannes Marbach --- changelogs/client_server/newsfragments/2245.clarification | 1 + content/client-server-api/modules/end_to_end_encryption.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelogs/client_server/newsfragments/2245.clarification diff --git a/changelogs/client_server/newsfragments/2245.clarification b/changelogs/client_server/newsfragments/2245.clarification new file mode 100644 index 00000000..2d0453a2 --- /dev/null +++ b/changelogs/client_server/newsfragments/2245.clarification @@ -0,0 +1 @@ +`device_one_time_keys_count` is only optional if no unclaimed one-time keys exist. diff --git a/content/client-server-api/modules/end_to_end_encryption.md b/content/client-server-api/modules/end_to_end_encryption.md index fcc87625..251fe484 100644 --- a/content/client-server-api/modules/end_to_end_encryption.md +++ b/content/client-server-api/modules/end_to_end_encryption.md @@ -1778,7 +1778,7 @@ a way to identify the server's support for fallback keys. | Parameter | Type | Description | |----------------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------| | device_lists | DeviceLists | Optional. Information on e2e device updates. Note: only present on an incremental sync. | -| device_one_time_keys_count | {string: integer} | Optional. For each key algorithm, the number of unclaimed one-time keys currently held on the server for this device. If an algorithm is unlisted, the count for that algorithm is assumed to be zero. If this entire parameter is missing, the count for all algorithms is assumed to be zero. | +| device_one_time_keys_count | {string: integer} | **Required if unclaimed one-time keys exist.** For each key algorithm, the number of unclaimed one-time keys currently held on the server for this device. If the count for an algorithm is zero, servers MAY omit that algorithm. If the count for all algorithms is zero, servers MAY omit this parameter entirely. | | device_unused_fallback_key_types | [string] | **Required.** The unused fallback key algorithms. | `DeviceLists`