From bf5fbc994536edf086519a7dec73c6a5fef93b39 Mon Sep 17 00:00:00 2001 From: gewitternacht <60887951+gewitternacht@users.noreply.github.com> Date: Wed, 15 Jul 2026 00:42:07 +0200 Subject: [PATCH] use User ID type in OlmPayload and DeviceKeys (#2412) * use User ID type in OlmPayload and DeviceKeys Signed-off-by: Johanna Stuber * add newsfragment Signed-off-by: Johanna Stuber --------- Signed-off-by: Johanna Stuber --- changelogs/client_server/newsfragments/2412.clarification | 1 + data/api/client-server/definitions/device_keys.yaml | 2 ++ data/api/client-server/definitions/olm_payload.yaml | 4 ++++ 3 files changed, 7 insertions(+) create mode 100644 changelogs/client_server/newsfragments/2412.clarification diff --git a/changelogs/client_server/newsfragments/2412.clarification b/changelogs/client_server/newsfragments/2412.clarification new file mode 100644 index 00000000..4cf20f36 --- /dev/null +++ b/changelogs/client_server/newsfragments/2412.clarification @@ -0,0 +1 @@ +Use the User ID type in OlmPayload and DeviceKeys. \ No newline at end of file diff --git a/data/api/client-server/definitions/device_keys.yaml b/data/api/client-server/definitions/device_keys.yaml index 2a7f8104..c96cc30d 100644 --- a/data/api/client-server/definitions/device_keys.yaml +++ b/data/api/client-server/definitions/device_keys.yaml @@ -20,6 +20,8 @@ properties: description: |- The ID of the user the device belongs to. Must match the user ID used when logging in. + format: mx-user-id + pattern: "^@" example: "@alice:example.com" device_id: type: string diff --git a/data/api/client-server/definitions/olm_payload.yaml b/data/api/client-server/definitions/olm_payload.yaml index d322129e..4ce6ce8a 100644 --- a/data/api/client-server/definitions/olm_payload.yaml +++ b/data/api/client-server/definitions/olm_payload.yaml @@ -27,9 +27,13 @@ properties: sender: type: string description: The user ID of the event sender. + format: mx-user-id + pattern: "^@" recipient: type: string description: The user ID of the intended event recipient. + format: mx-user-id + pattern: "^@" recipient_keys: description: The recipient's signing keys of the encrypted event. $ref: "#/components/schemas/SigningKeys"