swaggerify to-device
This commit is contained in:
parent
d789564db7
commit
0f9a23c471
2 changed files with 69 additions and 13 deletions
|
@ -0,0 +1,68 @@
|
||||||
|
# Copyright 2018 New Vector Ltd
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
type: object
|
||||||
|
title: m.direct_to_device
|
||||||
|
description: |-
|
||||||
|
An EDU that lets servers push send events directly to a specific device on
|
||||||
|
a remote server - for instance, to maintain an Olm E2E encrypted message channel
|
||||||
|
between a local and remote device.
|
||||||
|
allOf:
|
||||||
|
- $ref: ../edu.yaml
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
edu_type:
|
||||||
|
type: enum
|
||||||
|
enum: ['m.direct_to_device']
|
||||||
|
description: The string ``m.direct_to_device``
|
||||||
|
example: "m.direct_to_device"
|
||||||
|
content:
|
||||||
|
type: object
|
||||||
|
description: The description of the direct-to-device message
|
||||||
|
title: To Device Message
|
||||||
|
properties:
|
||||||
|
sender:
|
||||||
|
type: string
|
||||||
|
description: user ID of the sender
|
||||||
|
example: "john@example.com"
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
description: event type for the message
|
||||||
|
example: "m.room_key_request"
|
||||||
|
message_id:
|
||||||
|
type: string
|
||||||
|
description: unique ID for the message, used for idempotence. Arbitrary
|
||||||
|
utf8 string, of maximum length 32 codepoints.
|
||||||
|
example: "hiezohf6Hoo7kaev"
|
||||||
|
messages:
|
||||||
|
type: object
|
||||||
|
description: |-
|
||||||
|
The contents of the messages to be sent. These are arranged in
|
||||||
|
a map of user IDs to a map of device IDs to message bodies.
|
||||||
|
The device ID may also be *, meaning all known devices for the user.
|
||||||
|
example: {
|
||||||
|
"alice@example.org": {
|
||||||
|
"IWHQUZUIAH": {
|
||||||
|
"algorithm": "m.megolm.v1.aes-sha2",
|
||||||
|
"room_id": "!Cuyf34gef24t:localhost",
|
||||||
|
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
|
||||||
|
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8LlfJL7qNBEY..."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
required:
|
||||||
|
- sender
|
||||||
|
- type
|
||||||
|
- message_id
|
||||||
|
- messages
|
|
@ -1020,19 +1020,7 @@ EDU. There are no PDUs or Federation Queries involved.
|
||||||
Each send-to-device message should be sent to the destination server using
|
Each send-to-device message should be sent to the destination server using
|
||||||
the following EDU::
|
the following EDU::
|
||||||
|
|
||||||
EDU type: m.direct_to_device
|
{{definition_ss_event_schemas_m_direct_to_device}}
|
||||||
|
|
||||||
Content keys:
|
|
||||||
sender: user ID of the sender
|
|
||||||
|
|
||||||
type: event type for the message
|
|
||||||
|
|
||||||
message_id: unique id for the message: used for idempotence
|
|
||||||
|
|
||||||
messages: The messages to send. A map from user ID, to a map from device ID
|
|
||||||
to message body. The device ID may also be *, meaning all known devices
|
|
||||||
for the user
|
|
||||||
|
|
||||||
|
|
||||||
Content Repository
|
Content Repository
|
||||||
------------------
|
------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue