From e85087401960f961f328bcce64f92d6e1df8b589 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 28 Apr 2021 10:05:34 +0200 Subject: [PATCH] clarify order --- src/matrix/Sync.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/matrix/Sync.js b/src/matrix/Sync.js index 9265d894..d018900e 100644 --- a/src/matrix/Sync.js +++ b/src/matrix/Sync.js @@ -291,6 +291,9 @@ export class Sync { for(let rs of roomStates) { log.wrap("room", log => rs.room.afterSync(rs.changes, log), log.level.Detail); if (rs.isNewRoom) { + // important to add the room before removing the invite, + // so the room will be found if looking for it when the invite + // is removed this._session.addRoomAfterSync(rs.room); } }