Skip to content

Commit

Permalink
refactor encrypted file schema as "Extension to m.message"
Browse files Browse the repository at this point in the history
  • Loading branch information
uhoreg committed Aug 31, 2018
1 parent 28ced3b commit e3daf10
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 171 deletions.
55 changes: 0 additions & 55 deletions event-schemas/examples/m.room.message.encrypted_file

This file was deleted.

Expand Up @@ -20,6 +20,12 @@ properties:
thumbnail_url:
description: The URL to a thumbnail of the image.
type: string
thumbnail_file:
description: |-
Information on the encrypted thumbnail file, as specified in
|encrypted_files|_.
title: EncryptedFile
type: object
thumbnail_info:
allOf:
- $ref: thumbnail_info.yaml
Expand Down
9 changes: 7 additions & 2 deletions event-schemas/schema/m.room.message#m.audio
Expand Up @@ -27,12 +27,17 @@ properties:
- m.audio
type: string
url:
description: The URL to the audio clip.
description: Required if the file is not encrypted. The URL to the audio clip.
type: string
file:
description: |-
Required if the file is encrypted. Information on the encrypted
file, as specified in |encrypted_files|_.
title: EncryptedFile
type: object
required:
- msgtype
- body
- url
type: object
type:
enum:
Expand Down
15 changes: 13 additions & 2 deletions event-schemas/schema/m.room.message#m.file
Expand Up @@ -23,6 +23,12 @@ properties:
thumbnail_url:
description: The URL to the thumbnail of the file.
type: string
thumbnail_file:
description: |-
Information on the encrypted thumbnail file, as specified in
|encrypted_files|_.
title: EncryptedFile
type: object
thumbnail_info:
allOf:
- $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
Expand All @@ -34,12 +40,17 @@ properties:
- m.file
type: string
url:
description: The URL to the file.
description: Required if the file is unencrypted. The URL to the file.
type: string
file:
description: |-
Required if the file is encrypted. Information on the encrypted
file, as specified in |encrypted_files|_.
title: EncryptedFile
type: object
required:
- msgtype
- body
- url
- filename
type: object
type:
Expand Down
9 changes: 7 additions & 2 deletions event-schemas/schema/m.room.message#m.image
Expand Up @@ -17,12 +17,17 @@ properties:
- m.image
type: string
url:
description: The URL to the image.
description: Required if the file is unencrypted. The URL to the image.
type: string
file:
description: |-
Required if the file is encrypted. Information on the encrypted
file, as specified in |encrypted_files|_.
title: EncryptedFile
type: object
required:
- msgtype
- body
- url
type: object
type:
enum:
Expand Down
6 changes: 6 additions & 0 deletions event-schemas/schema/m.room.message#m.location
Expand Up @@ -21,6 +21,12 @@ properties:
thumbnail_url:
description: The URL to a thumbnail of the location being represented.
type: string
thumbnail_file:
description: |-
Information on the encrypted thumbnail file, as specified in
|encrypted_files|_.
title: EncryptedFile
type: object
thumbnail_info:
allOf:
- $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
Expand Down
15 changes: 13 additions & 2 deletions event-schemas/schema/m.room.message#m.video
Expand Up @@ -29,6 +29,12 @@ properties:
thumbnail_url:
description: The URL to an image thumbnail of the video clip.
type: string
thumbnail_file:
description: |-
Information on the encrypted thumbnail file, as specified in
|encrypted_files|_.
title: EncryptedFile
type: object
thumbnail_info:
allOf:
- $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
Expand All @@ -40,12 +46,17 @@ properties:
- m.video
type: string
url:
description: The URL to the video clip.
description: Required if the file is unencrypted. The URL to the video clip.
type: string
file:
description: |-
Required if the file is encrypted. Information on the encrypted
file, as specified in |encrypted_files|_.
title: EncryptedFile
type: object
required:
- msgtype
- body
- url
type: object
type:
enum:
Expand Down
100 changes: 0 additions & 100 deletions event-schemas/schema/m.room.message.encrypted_file

This file was deleted.

0 comments on commit e3daf10

Please sign in to comment.