when rejoining, room will be archived so consider any non-join a rejoin

This commit is contained in:
Bruno Windels 2021-05-05 17:04:39 +02:00
parent 1258aaee7c
commit 07535eedca

View file

@ -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);
}