|
|
|
|
@ -23,8 +23,7 @@ as follows:
|
|
|
|
|
type: string;
|
|
|
|
|
content: unknown;
|
|
|
|
|
room_id?: string;
|
|
|
|
|
future_timeout?: number; // new field
|
|
|
|
|
parent_future_id?: string; // new field
|
|
|
|
|
delay?: number; // new field
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
@ -34,37 +33,44 @@ and the `"send_event"` response:
|
|
|
|
|
{
|
|
|
|
|
room_id: string;
|
|
|
|
|
event_id?: string; // now optional
|
|
|
|
|
parent_future_id?: string; // new field
|
|
|
|
|
delay_id?: string; // new field
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
to provide the same properties needed for [MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140).
|
|
|
|
|
The client is responsible to check
|
|
|
|
|
for the field `future_timeout` or `parent_future_id` of the widget action and send a `/send` or `/send_future` http request
|
|
|
|
|
if one of them is present.
|
|
|
|
|
|
|
|
|
|
Additionally the response is extended with the tokens and the `parent_future_id`.
|
|
|
|
|
for the field `delay` of the widget action and send the correct http request
|
|
|
|
|
if one of it is present.
|
|
|
|
|
|
|
|
|
|
All other details about the future concept can be found in [MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140)
|
|
|
|
|
so here we intentionally don't mention any of the details about futures.
|
|
|
|
|
|
|
|
|
|
### Sending `update_future` actions
|
|
|
|
|
### Sending `update_delayed_event` actions
|
|
|
|
|
|
|
|
|
|
```jsonc
|
|
|
|
|
{
|
|
|
|
|
"direction": "fromWidget",
|
|
|
|
|
"action":"update_future",
|
|
|
|
|
"action":"update_delayed_event",
|
|
|
|
|
"data":{
|
|
|
|
|
"future_id":,
|
|
|
|
|
"delay_id": string,
|
|
|
|
|
"action":"cancel"|"send"|"refresh"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
response
|
|
|
|
|
The response is empty on success or otherwise a widget error response.
|
|
|
|
|
|
|
|
|
|
```jsonc
|
|
|
|
|
{}
|
|
|
|
|
```
|
|
|
|
|
### Capabilities
|
|
|
|
|
|
|
|
|
|
Two new capabilities will be introduces:
|
|
|
|
|
|
|
|
|
|
- `m.send.delay_events`\
|
|
|
|
|
allows to send delayed events by using the optional `delay` property in a `fromWidget send_event` widget action.
|
|
|
|
|
- `m.update_delayed_event`\
|
|
|
|
|
allows to update delayed events using the `fromWidget update_delayed_event` widget action.
|
|
|
|
|
|
|
|
|
|
## Unstable prefix
|
|
|
|
|
|
|
|
|
|
or an error response if an error occurred.
|
|
|
|
|
- `update_delayed_event` -> `org.matrix.msc4157.update_delayed_event`
|
|
|
|
|
- `m.send.delayed_event` -> `org.matrix.msc4157.send.delayed_event`
|
|
|
|
|
- `m.update_delayed_event` -> `org.matrix.msc4157.update.delayed_event`
|
|
|
|
|
|