Skip to content

Commit

Permalink
Remove the "required" designation from the url field of certain
Browse files Browse the repository at this point in the history
m.room.message msgtypes.

Now that content referenced by the *m.audio*, *m.file*, *m.image*, and
*m.video* message types can be encrypted, the `url` field is required
*only* if the content is unencrypted. The "required" designation in the
event schemas (which prefixes the field description with "Required" in
bold in the generated HTML) is used to indicate fields which must always
be present, and this is no longer the case.

Signed-off-by: Jimmy Cuadra <jimmy@jimmycuadra.com>
  • Loading branch information
jimmycuadra committed Jun 14, 2019
1 parent 8bfc42b commit c8b5d64
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions event-schemas/schema/m.room.message$m.audio
Expand Up @@ -28,7 +28,7 @@ properties:
type: string
url:
description: |-
Required if the file is not encrypted. The URL (typically `MXC URI`_)
Required if the file is unencrypted. The URL (typically `MXC URI`_)
to the audio clip.
type: string
file:
Expand All @@ -40,7 +40,6 @@ properties:
required:
- msgtype
- body
- url
type: object
type:
enum:
Expand Down
1 change: 0 additions & 1 deletion event-schemas/schema/m.room.message$m.file
Expand Up @@ -55,7 +55,6 @@ properties:
required:
- msgtype
- body
- url
type: object
type:
enum:
Expand Down
1 change: 0 additions & 1 deletion event-schemas/schema/m.room.message$m.image
Expand Up @@ -30,7 +30,6 @@ properties:
required:
- msgtype
- body
- url
type: object
type:
enum:
Expand Down
1 change: 0 additions & 1 deletion event-schemas/schema/m.room.message$m.video
Expand Up @@ -61,7 +61,6 @@ properties:
required:
- msgtype
- body
- url
type: object
type:
enum:
Expand Down

0 comments on commit c8b5d64

Please sign in to comment.