-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1271 from uhoreg/add_verification_request_msgtype
add in-room m.key.verification.request msgtype
- Loading branch information
Showing
7 changed files
with
110 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add missing documentation for `m.key.verification.request` msgtype for in-room verification. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
data/event-schemas/examples/m.room.message$m.key.verification.request.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"event_id": "$143273582443PhrSn:example.org", | ||
"origin_server_ts": 1432735824653, | ||
"room_id": "!jEsUZKDJdhlrceRyVU:example.org", | ||
"sender": "@alice:example.org", | ||
"type": "m.room.message", | ||
"unsigned": { | ||
"age": 1234 | ||
}, | ||
"content": { | ||
"body": "Alice is requesting to verify your device, but your client does not support verification, so you may need to use a different verification method.", | ||
"from_device": "AliceDevice2", | ||
"methods": [ | ||
"m.sas.v1" | ||
], | ||
"to": "@bob:example.org", | ||
"msgtype": "m.key.verification.request" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
data/event-schemas/schema/m.room.message$m.key.verification.request.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
allOf: | ||
- $ref: core-event-schema/room_event.yaml | ||
description: | ||
Requests a key verification in a room. When requesting a key verification | ||
using to-device messaging, an event with type [`m.key.verification.request`](#mkeyverificationrequest) | ||
should be used. | ||
properties: | ||
content: | ||
properties: | ||
body: | ||
type: string | ||
description: |- | ||
A fallback message to alert users that their client does not support | ||
the key verification framework, and that they should use a different method | ||
to verify keys. For example, "Alice is requesting to verify keys with you. | ||
However, your client does not support this method, so you will need to use | ||
the legacy method of key verification." | ||
Clients that do support the key verification framework should hide the body | ||
and instead present the user with an interface to accept or reject the key | ||
verification. | ||
format: | ||
description: |- | ||
The format used in the `formatted_body`. Currently only | ||
`org.matrix.custom.html` is supported. | ||
type: string | ||
formatted_body: | ||
description: |- | ||
The formatted version of the `body`. This is required if `format` is | ||
specified. As with the `body`, clients that do support the key | ||
verification framework should hide the formatted body and instead | ||
present the user with an interface to accept or reject the key | ||
verification. | ||
type: string | ||
from_device: | ||
type: string | ||
description: |- | ||
The device ID which is initiating the request. | ||
methods: | ||
type: array | ||
description: |- | ||
The verification methods supported by the sender. | ||
items: | ||
type: string | ||
to: | ||
description: |- | ||
The user that the verification request is intended for. Users who | ||
are not named in this field and who did not send this event should | ||
ignore all other events that have an `m.reference` relationship with | ||
this event. | ||
type: string | ||
msgtype: | ||
enum: | ||
- m.key.verification.request | ||
type: string | ||
required: | ||
- from_device | ||
- methods | ||
- msgtype | ||
- to | ||
type: object | ||
type: | ||
enum: | ||
- m.room.message | ||
type: string | ||
title: KeyVerification | ||
type: object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters