File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -530,7 +530,7 @@ export const UNSTABLE_MSC2666_SHARED_ROOMS = "uk.half-shot.msc2666";
530530export const UNSTABLE_MSC2666_MUTUAL_ROOMS = "uk.half-shot.msc2666.mutual_rooms" ;
531531export const UNSTABLE_MSC2666_QUERY_MUTUAL_ROOMS = "uk.half-shot.msc2666.query_mutual_rooms" ;
532532
533- const UNSTABLE_MSC4140_FUTURES = "org.matrix.msc4140" ;
533+ export const UNSTABLE_MSC4140_FUTURES = "org.matrix.msc4140" ;
534534
535535enum CrossSigningKeyType {
536536 MasterKey = "master_key" ,
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import {
4242 IStartClientOpts ,
4343 SendToDeviceContentMap ,
4444 IOpenIDToken ,
45+ UNSTABLE_MSC4140_FUTURES ,
4546} from "./client" ;
4647import { SyncApi , SyncState } from "./sync" ;
4748import { SlidingSyncSdk } from "./sliding-sync-sdk" ;
@@ -330,6 +331,10 @@ export class RoomWidgetClient extends MatrixClient {
330331 content : StateEvents [ K ] ,
331332 stateKey = "" ,
332333 ) : Promise < SendFutureResponse < F > > {
334+ if ( ! ( await this . doesServerSupportUnstableFeature ( UNSTABLE_MSC4140_FUTURES ) ) ) {
335+ throw Error ( "Server does not support the Futures API" ) ;
336+ }
337+
333338 // TODO: better type checking
334339 return ( await this . widgetApi . sendStateEvent (
335340 eventType ,
You can’t perform that action at this time.
0 commit comments