Skip to content

Commit 2188c0f

Browse files
committed
Merge send*Future into send*Event
1 parent 47d752d commit 2188c0f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/embedded.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@ export class RoomWidgetClient extends MatrixClient {
267267
): Promise<ISendEventResponse | ISendTimeoutFutureResponse | ISendActionFutureResponse> {
268268
if (futureOpts) {
269269
// TODO: updatePendingEvent for futures?
270-
const response = await this.widgetApi.sendRoomFuture(
270+
const response = await this.widgetApi.sendRoomEvent(
271271
event.getType(),
272272
event.getContent(),
273+
room.roomId,
273274
"future_timeout" in futureOpts ? futureOpts.future_timeout : undefined,
274275
"future_group_id" in futureOpts ? futureOpts.future_group_id : undefined,
275-
room.roomId,
276276
);
277277
if (!response.future_group_id) {
278278
throw new Error("'future_group_id' absent from response to a futures request");
@@ -324,13 +324,13 @@ export class RoomWidgetClient extends MatrixClient {
324324
stateKey = "",
325325
): Promise<ISendFutureResponse<F>> {
326326
// TODO: better type checking
327-
return (await this.widgetApi.sendStateFuture(
327+
return (await this.widgetApi.sendStateEvent(
328328
eventType,
329329
stateKey,
330330
content,
331+
roomId,
331332
"future_timeout" in futureOpts ? futureOpts.future_timeout : undefined,
332333
"future_group_id" in futureOpts ? futureOpts.future_group_id : undefined,
333-
roomId,
334334
)) as unknown as ISendFutureResponse<F>;
335335
}
336336

0 commit comments

Comments
 (0)