You've already forked matrix-js-sdk
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:
@@ -1106,7 +1106,6 @@ SyncApi.prototype._processSyncResponse = async function(
|
|||||||
leaveRooms.forEach(function(leaveObj) {
|
leaveRooms.forEach(function(leaveObj) {
|
||||||
const room = leaveObj.room;
|
const room = leaveObj.room;
|
||||||
room.setSyncedMembership("leave");
|
room.setSyncedMembership("leave");
|
||||||
room.onLeft();
|
|
||||||
|
|
||||||
const stateEvents =
|
const stateEvents =
|
||||||
self._mapSyncEventsFormat(leaveObj.state, room);
|
self._mapSyncEventsFormat(leaveObj.state, room);
|
||||||
@@ -1135,6 +1134,8 @@ SyncApi.prototype._processSyncResponse = async function(
|
|||||||
accountDataEvents.forEach(function(e) {
|
accountDataEvents.forEach(function(e) {
|
||||||
client.emit("event", e);
|
client.emit("event", e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
room.onLeft();
|
||||||
});
|
});
|
||||||
|
|
||||||
// update the notification timeline, if appropriate.
|
// update the notification timeline, if appropriate.
|
||||||
|
|||||||
Reference in New Issue
Block a user