1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

do onLeft (which clears the LL members) as late as possible

to avoid chance that something might call loadMembersIfNeeded
on the room and load them back again.
This commit is contained in:
Bruno Windels
2018-08-31 16:13:34 +02:00
parent f30136dba3
commit ebc162e3d8

View File

@@ -1106,7 +1106,6 @@ SyncApi.prototype._processSyncResponse = async function(
leaveRooms.forEach(function(leaveObj) {
const room = leaveObj.room;
room.setSyncedMembership("leave");
room.onLeft();
const stateEvents =
self._mapSyncEventsFormat(leaveObj.state, room);
@@ -1135,6 +1134,8 @@ SyncApi.prototype._processSyncResponse = async function(
accountDataEvents.forEach(function(e) {
client.emit("event", e);
});
room.onLeft();
});
// update the notification timeline, if appropriate.