MSC1716: Open on device API#1716
Conversation
39fcfa9 to
5b3647b
Compare
|
|
||
| The recipient device ID should be the stored preference stated previously. | ||
|
|
||
| When the message arrives on the recipient device, the device must immediately change the current view to show the type in the contents. It is not |
There was a problem hiding this comment.
I would suggest that clients should prompt the user rather than immediately changing display. This would help mitigate the two listed potential issues.
|
|
||
| ```json | ||
| { | ||
| "type": "room", |
There was a problem hiding this comment.
Instead of specifying different types, you could also use matrix:// URLs (when that lands), and just have a single href property.
|
|
||
| ### Schema | ||
|
|
||
| The event type should be `m.openondevice` and the `EventContent` should be: |
There was a problem hiding this comment.
bikeshedding: m.open_on_device instead of m.openondevice. Though the "on device" is somewhat redundant since it's a to_device message. So maybe just m.open, or m.goto to match the /goto command
| | type | string | One of "room", "event", "user" or "group" | Non-optional | | ||
| | room_id | string | A room ID when the type is "event" | | | ||
| | via [1] | string[] | A set of servers needed for "room" and "event" | [] | | ||
| | id | string | A room ID, event ID, user ID | Non-optional | |
There was a problem hiding this comment.
Even if we're not soon getting nice matrix:// URIs mentioned above, I'm not quite sure what you get by producing a separate type field. Why not just use room (standing for id or alias - they can be easily discerned by a sigil), user, event, and group as keys? E.g.,
"content": { "room": "!aroomfor:allof.us" }would be used to open a room (modulo via), while
"content": {
"room": "#allofus:allof.us",
"event": "$event:allof.us"
}would be the same for events.
That wouldn't work if you want to make this system client-extensible (with, say, Riot using its own "type": "im.riot.popup" standing for a popup specifically within Riot clients) but I seriously doubt in such extensibility being worthwhile or even desired.
|
|
||
| | key | type | value | Default | | ||
| |---------|----------|------------------------------------------------|--------------| | ||
| | type | string | One of "room", "event", "user" or "group" | Non-optional | |
There was a problem hiding this comment.
Non-optional -> required, or mandatory?
turt2live
left a comment
There was a problem hiding this comment.
in general, why not an m.open event like this:
{
"uri": "https://matrix.to/#/!somewhere:example.org"
}Assuming the documentation reads similar to "the uri is the location to open, which may current be a [matrix.to] URI or in the future some sort of matrix://-scheme resource".
| ```json | ||
| { | ||
| "type": "room", | ||
| "via": "half-shot.uk", |
| { | ||
| "type": "event", | ||
| "room_id": "!someneatlookingroom:matrix.org", | ||
| "via": "half-shot.uk", |
There was a problem hiding this comment.
again: this should be an array
| { | ||
| "type": "room", | ||
| "via": "half-shot.uk", | ||
| "id": "!someneatlookingroom:matrix.org", |
There was a problem hiding this comment.
what if the room is an alias?
| } | ||
| ``` | ||
|
|
||
| | key | type | value | Default | |
There was a problem hiding this comment.
formatting: this table is under group, not a more general location.
| | key | type | value | Default | | ||
| |---------|----------|------------------------------------------------|--------------| | ||
| | type | string | One of "room", "event", "user" or "group" | Non-optional | | ||
| | room_id | string | A room ID when the type is "event" | | |
There was a problem hiding this comment.
surely this is required under some circumstances?
| |---------|----------|------------------------------------------------|--------------| | ||
| | type | string | One of "room", "event", "user" or "group" | Non-optional | | ||
| | room_id | string | A room ID when the type is "event" | | | ||
| | via [1] | string[] | A set of servers needed for "room" and "event" | [] | |
There was a problem hiding this comment.
... it's an array down here but not above :(
(see previous comments)
Rendered