You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With [MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140) a way to send Future events is introduced. Futures are events that are send **now** but will
4
+
be inserted into the dag (and distributed to all clients and federating servers) a time after **now** (based on timeout or delegation conditions).
5
+
6
+
This is an extension to the client server api to expose Futures to widgets.
7
+
This can be useful for numerous widgets. It is required for widgets implementing MatrixRTC.
8
+
Futures are needed for reliable MatrixRTC memberships that get cleaned up when a client looses network connection.
9
+
10
+
Since ElementCall (EC) is a widget and based on MatrixRTC this widget api proposel is required for EC to work.
11
+
12
+
## Proposal
13
+
14
+
We extend the send
15
+
`"send_event"` request:
16
+
17
+
```
18
+
{
19
+
state_key?: string;
20
+
type: string;
21
+
content: unknown;
22
+
room_id?: string;
23
+
24
+
timeout?: number;
25
+
group_id?: string;
26
+
}
27
+
```
28
+
29
+
and the `"send_event"` response:
30
+
31
+
```
32
+
{
33
+
room_id: string;
34
+
event_id: string;
35
+
36
+
group_id: string;
37
+
send_token: string;
38
+
cancel_token: string;
39
+
refresh_token: string;
40
+
}
41
+
```
42
+
43
+
to provide the same properties needed for [MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140). The client is responsible to check
44
+
for the field `timeout` or `group_id` of the widget action and send a `/send` or `/send_future` http request
45
+
if one of them is present.
46
+
47
+
Additionally the response is extended with the tokens and the group_id.
48
+
49
+
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
0 commit comments