Move m.room_key.withheld content to a spearate file

... so that we can reuse it in key bundles
This commit is contained in:
Richard van der Hoff 2026-06-12 13:47:20 +01:00
parent e3f6bc4feb
commit f48bf2e9eb
2 changed files with 46 additions and 45 deletions

View file

@ -0,0 +1,45 @@
type: object
properties:
algorithm:
type: string
enum: ["m.megolm.v1.aes-sha2"]
description: |-
The encryption algorithm for the key that this event is about.
room_id:
type: string
description: |-
Required if `code` is not `m.no_olm`. The room for the key that
this event is about.
session_id:
type: string
description: |-
Required if `code` is not `m.no_olm`. The session ID of the key
that this event is about.
sender_key:
type: string
description: |-
The unpadded base64-encoded device curve25519 key of the event\'s
sender.
code:
type: string
enum:
- m.blacklisted
- m.unverified
- m.unauthorised
- m.unavailable
- m.no_olm
description: |-
A machine-readable code for why the key was not sent. Codes beginning
with `m.` are reserved for codes defined in the Matrix
specification. Custom codes must use the Java package naming
convention.
reason:
type: string
description: |-
A human-readable reason for why the key was not sent. The receiving
client should only use this string if it does not understand the
`code`.
required:
- algorithm
- sender_key
- code

View file

@ -36,51 +36,7 @@ description: |-
room messages sent before it receives the message.
properties:
content:
properties:
algorithm:
type: string
enum: ["m.megolm.v1.aes-sha2"]
description: |-
The encryption algorithm for the key that this event is about.
room_id:
type: string
description: |-
Required if `code` is not `m.no_olm`. The room for the key that
this event is about.
session_id:
type: string
description: |-
Required if `code` is not `m.no_olm`. The session ID of the key
that this event is about.
sender_key:
type: string
description: |-
The unpadded base64-encoded device curve25519 key of the event\'s
sender.
code:
type: string
enum:
- m.blacklisted
- m.unverified
- m.unauthorised
- m.unavailable
- m.no_olm
description: |-
A machine-readable code for why the key was not sent. Codes beginning
with `m.` are reserved for codes defined in the Matrix
specification. Custom codes must use the Java package naming
convention.
reason:
type: string
description: |-
A human-readable reason for why the key was not sent. The receiving
client should only use this string if it does not understand the
`code`.
required:
- algorithm
- sender_key
- code
type: object
$ref: "components/room_key_withheld_content.yaml"
type:
enum:
- m.room_key.withheld