File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -289,7 +289,11 @@ export class RoomWidgetClient extends MatrixClient {
289289
290290 await this . widgetApiReady ;
291291
292- if ( ! ( await this . supportUpdateState ( ) ) ) {
292+ // sync room state:
293+ if ( await this . supportUpdateState ( ) ) {
294+ // This will resolve once the client driver has sent us all the allowed room state.
295+ await this . roomStateSynced ;
296+ } else {
293297 // Backfill the requested events
294298 // We only get the most recent event for every type + state key combo,
295299 // so it doesn't really matter what order we inject them in
@@ -320,8 +324,6 @@ export class RoomWidgetClient extends MatrixClient {
320324 } , 1000 * opts . clientWellKnownPollPeriod ) ;
321325 this . fetchClientWellKnown ( ) ;
322326 }
323-
324- await this . roomStateSynced ;
325327 this . setSyncState ( SyncState . Syncing ) ;
326328 logger . info ( "Finished initial sync" ) ;
327329
You can’t perform that action at this time.
0 commit comments