From 07535eedca9aa11015d13dbd0b0b527c97f2803c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 5 May 2021 17:04:39 +0200 Subject: [PATCH] when rejoining, room will be archived so consider any non-join a rejoin --- src/matrix/room/Room.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index c9d08e05..213575e9 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -249,7 +249,7 @@ export class Room extends EventEmitter { /** @package */ async writeSync(roomResponse, isInitialSync, {summaryChanges, decryptChanges, roomEncryption, retryEntries}, txn, log) { log.set("id", this.id); - const isRejoin = summaryChanges.membership === "join" && this._summary.data.membership === "leave"; + const isRejoin = summaryChanges.membership === "join" && this.membership !== "join"; if (isRejoin) { this._summary.tryRemoveArchive(txn); }