@@ -132,7 +132,6 @@ import {
132132 IRoomDirectoryOptions ,
133133 ISearchOpts ,
134134 ISendEventResponse ,
135- ISendFutureGroupResponse ,
136135 ISendFutureRequestOpts ,
137136 ISendFutureResponse ,
138137 IStatusResponse ,
@@ -5364,43 +5363,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
53645363 } ) ;
53655364 }
53665365
5367- /**
5368- * Send a group of future events.
5369- * TODO: type safety & threads...or remove altogether
5370- *
5371- * Note: This endpoint is unstable, and can throw an `Error`.
5372- * Check progress on [MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140) for more details.
5373- */
5374- // eslint-disable-next-line
5375- public async _unstable_sendFutureGroup (
5376- roomId : string ,
5377- timeout : number ,
5378- sendOnTimeout : MatrixEvent ,
5379- sendOnAction ?: Record < string , MatrixEvent > ,
5380- sendNow ?: MatrixEvent ,
5381- ) : Promise < ISendFutureGroupResponse > {
5382- if ( ! ( await this . doesServerSupportUnstableFeature ( UNSTABLE_MSC4140_FUTURES ) ) ) {
5383- throw Error ( "Server does not support the Futures API" ) ;
5384- }
5385-
5386- return await this . http . authedRequest < ISendFutureGroupResponse > (
5387- Method . Put ,
5388- // NOTE: Difference from MSC = remove /send part of path, to avoid ambiguity with regular event sending
5389- utils . encodeUri ( "/rooms/$roomId/future/$txnId" , {
5390- $roomId : roomId ,
5391- $txnId : this . makeTxnId ( ) ,
5392- } ) ,
5393- undefined ,
5394- {
5395- timeout,
5396- send_on_timeout : sendOnTimeout ,
5397- ...( sendOnAction ?? { send_on_action : sendOnAction } ) ,
5398- ...( sendNow ?? { send_now : sendNow } ) ,
5399- } ,
5400- { prefix : `${ ClientPrefix . Unstable } /${ UNSTABLE_MSC4140_FUTURES } ` } ,
5401- ) ;
5402- }
5403-
54045366 /**
54055367 * Get all pending futures for the calling user.
54065368 *
0 commit comments