You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sync responses containing rooms are converted using _mapSyncResponseToRoomArray in the SyncApi, currently. With this, rooms sometimes aren't sent off to reEmit to have their events reach the MatrixClient.
Here's the portion of code being mentioned from here on down:
A room is first looked up using the backing store, which may be in memory, web, or something else. If the room is found, it is passed along just fine with isBrandNewRoom false. If the room is not found, however, it is created and marked as a new room.
When the room is created, it is sent off to reEmit so the events originating from the room end up also being raised in the client.
Because of getRoom's contract on the store, it can't return null in hopes that the sdk will build a new one for it (especially considering the store may be returning other information that causes the sdk to not update room state, because the room should already have it.
This means that rooms coming out of the store may not re-emit their events to the client, leading to interesting behaviour in various applications using the sdk.
Of course I may have completely missed something that has lead me in the wrong direction. Please point me back to the correct path if I've strayed too far.
The text was updated successfully, but these errors were encountered:
Sync responses containing rooms are converted using
_mapSyncResponseToRoomArray
in the SyncApi, currently. With this, rooms sometimes aren't sent off toreEmit
to have their events reach the MatrixClient.Here's the portion of code being mentioned from here on down:
matrix-js-sdk/src/sync.js
Lines 968 to 973 in 547333c
A room is first looked up using the backing store, which may be in memory, web, or something else. If the room is found, it is passed along just fine with
isBrandNewRoom
false. If the room is not found, however, it is created and marked as a new room.(now referencing createRoom:
matrix-js-sdk/src/sync.js
Lines 91 to 105 in 547333c
When the room is created, it is sent off to
reEmit
so the events originating from the room end up also being raised in the client.Because of
getRoom
's contract on the store, it can't return null in hopes that the sdk will build a new one for it (especially considering the store may be returning other information that causes the sdk to not update room state, because the room should already have it.This means that rooms coming out of the store may not re-emit their events to the client, leading to interesting behaviour in various applications using the sdk.
Of course I may have completely missed something that has lead me in the wrong direction. Please point me back to the correct path if I've strayed too far.
The text was updated successfully, but these errors were encountered: