GA-Lotse 2.10.1
05.11.2025

Bugfix-ReleaseWhen we create a chat room using POST /createRoom we send some properties about the room in the payload to the server (e.g. that the room should be encrypted and who to invite).
The server then informs the matrix-js-sdk via events fetched using GET /sync requests about the created room and its properties. The SDK stores the information in a browser store.
When we then try to send a message, the SDK will use the information from the store to encrypt the message, if necessary.

However, these events are not necessarily received all at once but in multiple batches.
Typically this looks like this:
1st batch: m.room.power_levels, m.room.guest_access,
m.room.history_visibility, m.room.encryption, m.room.join_rules, m.room.encryption
2nd batch: m.room.member (add user that created the room)
3rd batch: m.room.member (add user(s) that were invited to the room)

Now, the room is created in the store after the first batch was received.
But at this point it's empty, Users are only added when subsequient batches are received.

Now, if we try to send a message after the first two batches are received the SDK won't encrypt the message for the invited user(s).
There's no way for the SDK to know that it should wait until the room is completly loaded since it lacks the information that something is missing.
Verifying that the SDK function `membersLoaded` returns true won't help in this scenario, as the SDK isn't aware of the missing user(s).