This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,14 @@ export default class RoomSettingsHandler extends MatrixClientBackedSettingsHandl
43
43
const roomId = event . getRoomId ( ) ;
44
44
const room = this . client . getRoom ( roomId ) ;
45
45
46
- // Note: the tests often fire setting updates that don't have rooms in the store, so
47
- // we fail softly here. We shouldn't assume that the state being fired is current
48
- // state, but we also don't need to explode just because we didn't find a room.
49
- if ( ! room ) console . warn ( `Unknown room caused setting update: ${ roomId } ` ) ;
50
- if ( room && state !== room . currentState ) return ; // ignore state updates which are not current
46
+ // Note: in tests and during the encryption setup on initial load we might not have
47
+ // rooms in the store, so we just quietly ignore the problem. If we log it then we'll
48
+ // just end up spamming the logs a few thousand times. It is perfectly fine for us
49
+ // to ignore the problem as the app will not have loaded enough to care yet.
50
+ if ( ! room ) return ;
51
+
52
+ // ignore state updates which are not current
53
+ if ( room && state !== room . currentState ) return ;
51
54
52
55
if ( event . getType ( ) === "org.matrix.room.preview_urls" ) {
53
56
let val = event . getContent ( ) [ 'disable' ] ;
You can’t perform that action at this time.
0 commit comments