mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-07-02 12:17:47 +02:00
Add shared_history flag to data structures
This commit is contained in:
parent
1efc0623fa
commit
272ce4cc08
|
|
@ -1967,7 +1967,7 @@ In order to enable end-to-end encryption in a room, clients can send an
|
|||
When creating a Megolm session in a room, clients must share the
|
||||
corresponding session key using Olm with the intended recipients, so
|
||||
that they can decrypt future messages encrypted using this session. An
|
||||
`m.room_key` event is used to do this. Clients must also handle
|
||||
[`m.room_key`](#mroom_key) event is used to do this. Clients must also handle
|
||||
`m.room_key` events sent by other devices in order to decrypt their
|
||||
messages.
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,12 @@ properties:
|
|||
description: |-
|
||||
Unpadded base64-encoded session key in [session-export format](https://gitlab.matrix.org/matrix-org/olm/blob/master/docs/megolm.md#session-export-format).
|
||||
example: "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8Llf..."
|
||||
shared_history:
|
||||
x-addedInMatrixVersion: "1.19"
|
||||
type: boolean
|
||||
description: |-
|
||||
Whether the session is [shareable](/client-server-api/#shareable-encryption-sessions).
|
||||
example: false
|
||||
required:
|
||||
- algorithm
|
||||
- forwarding_curve25519_key_chain
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
|
||||
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8LlfJL7qNBEY..."
|
||||
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8LlfJL7qNBEY...",
|
||||
"shared_history": false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,19 @@ properties:
|
|||
session_key:
|
||||
type: string
|
||||
description: The key to be exchanged.
|
||||
shared_history:
|
||||
x-addedInMatrixVersion: "1.19"
|
||||
type: boolean
|
||||
description: |
|
||||
`true` indicates that the creator of this encryption considers that
|
||||
the session is [shareable](/client-server-api/#shareable-encryption-sessions):
|
||||
in other words, the sender has observed that the [room history
|
||||
visibility](/client-server-api/#room-history-visibility) is set to
|
||||
`shared` or `world_readable`, and that they understand and agree that
|
||||
the session keys may be shared with newly-invited users in future.
|
||||
|
||||
Absence, or any other value, indicates that the creator of the
|
||||
session does not consider the session to be shareable.
|
||||
required:
|
||||
- algorithm
|
||||
- room_id
|
||||
|
|
|
|||
Loading…
Reference in a new issue