Skip to content

Commit f1f32d3

Browse files
committed
add more clarifications
1 parent e3daf10 commit f1f32d3

File tree

5 files changed

+35
-25
lines changed

5 files changed

+35
-25
lines changed

event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ properties:
1818
description: Size of the image in bytes.
1919
type: integer
2020
thumbnail_url:
21-
description: The URL to a thumbnail of the image.
21+
description: |-
22+
The URL to a thumbnail of the image. Only present if the
23+
thumbnail is unencrypted.
2224
type: string
2325
thumbnail_file:
2426
description: |-
2527
Information on the encrypted thumbnail file, as specified in
26-
|encrypted_files|_.
28+
|encrypted_files|_. Only present if the thumbnail is encrypted.
2729
title: EncryptedFile
2830
type: object
2931
thumbnail_info:

event-schemas/schema/m.room.message#m.file

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ properties:
2121
description: The size of the file in bytes.
2222
type: integer
2323
thumbnail_url:
24-
description: The URL to the thumbnail of the file.
24+
description: |-
25+
The URL to the thumbnail of the file. Only present if the
26+
thumbnail is unencrypted.
2527
type: string
2628
thumbnail_file:
2729
description: |-
2830
Information on the encrypted thumbnail file, as specified in
29-
|encrypted_files|_.
31+
|encrypted_files|_. Only present if the thumbnail is encrypted.
3032
title: EncryptedFile
3133
type: object
3234
thumbnail_info:

event-schemas/schema/m.room.message#m.location

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ properties:
1919
type: object
2020
properties:
2121
thumbnail_url:
22-
description: The URL to a thumbnail of the location being represented.
22+
description: |-
23+
The URL to the thumbnail of the file. Only present if the
24+
thumbnail is unencrypted.
2325
type: string
2426
thumbnail_file:
2527
description: |-
2628
Information on the encrypted thumbnail file, as specified in
27-
|encrypted_files|_.
29+
|encrypted_files|_. Only present if the thumbnail is encrypted.
2830
title: EncryptedFile
2931
type: object
3032
thumbnail_info:

event-schemas/schema/m.room.message#m.video

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ properties:
2727
description: The size of the video in bytes.
2828
type: integer
2929
thumbnail_url:
30-
description: The URL to an image thumbnail of the video clip.
30+
description: |-
31+
The URL to an image thumbnail of the video clip. Only present if the
32+
thumbnail is unencrypted.
3133
type: string
3234
thumbnail_file:
3335
description: |-
3436
Information on the encrypted thumbnail file, as specified in
35-
|encrypted_files|_.
37+
|encrypted_files|_. Only present if the thumbnail is encrypted.
3638
title: EncryptedFile
3739
type: object
3840
thumbnail_info:

specification/modules/end_to_end_encryption.rst

+19-17
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,10 @@ extension`_.
262262
Extensions to ``m.message`` msgtypes
263263
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
264264

265-
This module adds ``file`` and ``thumbnail_file`` properties to ``m.message``
266-
msgtypes that reference files, such as ``m.file`` and ``m.image``, replacing
267-
the ``url`` and ``thumbnail_url`` properties.
265+
This module adds ``file`` and ``thumbnail_file`` properties, of type
266+
``EncryptedFile``, to ``m.message`` msgtypes that reference files, such as
267+
`m.file`_ and `m.image`_, replacing the ``url`` and ``thumbnail_url``
268+
properties.
268269

269270
.. todo: generate this from a swagger definition?
270271
@@ -273,29 +274,30 @@ the ``url`` and ``thumbnail_url`` properties.
273274
========= ================ =====================================================
274275
Parameter Type Description
275276
========= ================ =====================================================
276-
url string The URL to the file.
277-
key JWK A `JSON Web Key`_ object.
278-
iv string The Initialisation Vector used by AES-CTR, encoded as
279-
unpadded base64.
280-
hashes {string: string} A map from an algorithm name to a hash of the
281-
ciphertext, encoded as unpadded base64. Clients
277+
url string **Required.** The URL to the file.
278+
key JWK **Required.** A `JSON Web Key`_ object.
279+
iv string **Required.** The Initialisation Vector used by
280+
AES-CTR, encoded as unpadded base64.
281+
hashes {string: string} **Required.** A map from an algorithm name to a hash
282+
of the ciphertext, encoded as unpadded base64. Clients
282283
should support the SHA-256 hash, which uses the key
283284
``sha256``.
284-
v string Version of the encrypted attachments protocol. Must
285-
be ``v2``.
285+
v string **Required.** Version of the encrypted attachments
286+
protocol. Must be ``v2``.
286287
========= ================ =====================================================
287288

288289
``JWK``
289290

290291
========= ========= ============================================================
291292
Parameter Type Description
292293
========= ========= ============================================================
293-
key string Key type. Must be ``oct``.
294-
key_opts [string] Key operations. Must at least contain ``encrypt`` and
295-
``decrypt``.
296-
alg string Algorithm. Must be ``A256CTR``.
297-
k string The key, encoded as urlsafe unpadded base64.
298-
ext boolean Extractable. Must be ``true``. This is a `W3C extension`_.
294+
key string **Required.** Key type. Must be ``oct``.
295+
key_opts [string] **Required.** Key operations. Must at least contain
296+
``encrypt`` and ``decrypt``.
297+
alg string **Required.** Algorithm. Must be ``A256CTR``.
298+
k string **Required.** The key, encoded as urlsafe unpadded base64.
299+
ext boolean **Required.** Extractable. Must be ``true``. This is a
300+
`W3C extension`_.
299301
========= ========= ============================================================
300302

301303
Example:

0 commit comments

Comments
 (0)