-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSC1716: Open on device API #1716
base: old_master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-optional -> required, or mandatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be an array
{ | ||
"type": "event", | ||
"room_id": "!someneatlookingroom:matrix.org", | ||
"via": "half-shot.uk", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again: this should be an array
{ | ||
"type": "room", | ||
"via": "half-shot.uk", | ||
"id": "!someneatlookingroom:matrix.org", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the room is an alias?
} | ||
``` | ||
|
||
| key | type | value | Default | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... it's an array down here but not above :(
(see previous comments)
Rendered