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 @@ -531,7 +531,7 @@ export const UNSTABLE_MSC2666_SHARED_ROOMS = "uk.half-shot.msc2666";
531531export const UNSTABLE_MSC2666_MUTUAL_ROOMS = "uk.half-shot.msc2666.mutual_rooms" ;
532532export const UNSTABLE_MSC2666_QUERY_MUTUAL_ROOMS = "uk.half-shot.msc2666.query_mutual_rooms" ;
533533
534- const UNSTABLE_MSC4140_FUTURES = "org.matrix.msc4140" ;
534+ export const UNSTABLE_MSC4140_FUTURES = "org.matrix.msc4140" ;
535535
536536enum CrossSigningKeyType {
537537 MasterKey = "master_key" ,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import {
3636 IStartClientOpts ,
3737 SendToDeviceContentMap ,
3838 IOpenIDToken ,
39+ UNSTABLE_MSC4140_FUTURES ,
3940} from "./client" ;
4041import { SyncApi , SyncState } from "./sync" ;
4142import { SlidingSyncSdk } from "./sliding-sync-sdk" ;
@@ -313,6 +314,10 @@ export class RoomWidgetClient extends MatrixClient {
313314 content : StateEvents [ K ] ,
314315 stateKey = "" ,
315316 ) : Promise < SendFutureResponse > {
317+ if ( ! ( await this . doesServerSupportUnstableFeature ( UNSTABLE_MSC4140_FUTURES ) ) ) {
318+ throw Error ( "Server does not support the Futures API" ) ;
319+ }
320+
316321 // TODO: better type checking
317322 return ( await this . widgetApi . sendStateEvent (
318323 eventType ,
You can’t perform that action at this time.
0 commit comments