From 126c3f0a496c75858185cc6d59f6838d0a55a9dc Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 23 Jun 2026 15:49:20 +0100 Subject: [PATCH] Define `history_not_shared` withheld code. --- .../schema/components/room_key_withheld_content.yaml | 1 + data/event-schemas/schema/m.room_key.withheld.yaml | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/data/event-schemas/schema/components/room_key_withheld_content.yaml b/data/event-schemas/schema/components/room_key_withheld_content.yaml index c1e6bf26..ec7bc136 100644 --- a/data/event-schemas/schema/components/room_key_withheld_content.yaml +++ b/data/event-schemas/schema/components/room_key_withheld_content.yaml @@ -31,6 +31,7 @@ properties: - m.unauthorised - m.unavailable - m.no_olm + - m.history_not_shared description: |- A machine-readable code for why the key was not sent. Codes beginning with `m.` are reserved for codes defined in the Matrix diff --git a/data/event-schemas/schema/m.room_key.withheld.yaml b/data/event-schemas/schema/m.room_key.withheld.yaml index 9371578d..96224fef 100644 --- a/data/event-schemas/schema/m.room_key.withheld.yaml +++ b/data/event-schemas/schema/m.room_key.withheld.yaml @@ -8,7 +8,7 @@ description: |- This event type is used to indicate that the sender is not sharing room keys with the recipient. It is sent as a to-device event. - Possible values for `code` include: + The following values for `code` are defined: * `m.blacklisted`: the user/device was blacklisted. * `m.unverified`: the user/device was not verified, and the sender is only @@ -19,6 +19,13 @@ description: |- * `m.unavailable`: sent in reply to a key request if the device that the key is requested from does not have the requested key. * `m.no_olm`: an olm session could not be established. + * **[Added in `v1.19`]** `m.history_not_shared`: when used as part of a + [`RoomKeyBundle` structure](/client-server-api/#definition-roomkeybundle), + indicates to the recipient of the bundle that the corresponding room key + was not marked as + [shareable](/client-server-api/#shareable-encryption-sessions) by the + sender. Clients SHOULD NOT use this `code` in a `m.room_key.withheld` + event. In most cases, this event refers to a specific room key. The one exception to this is when the sender is unable to establish an olm session with the