Skip to content

Commit 97a4c97

Browse files
jaller94Christian PaulHalf-Shot
authored
RoomAccessSyncer: Await processing of cached channel modes that changed. (#1620)
* RoomAccessSyncer: Await processing of cached channel modes that changed. * Rename change logfile * Rename 1620.bugfix to 1620.misc --------- Co-authored-by: Christian Paul <[email protected]> Co-authored-by: Will Hunt <[email protected]>
1 parent ab9d585 commit 97a4c97

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

changelog.d/1620.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RoomAccessSyncer: Await processing of cached channel modes that changed.

src/bridge/RoomAccessSyncer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,11 @@ export class RoomAccessSyncer {
344344
Object.values(roomModeMap).forEach((roomMode) => {
345345
roomMode.forEach((m) => {oldModes.add(m)});
346346
});
347-
req.log.debug(`Got cached mode for ${channel} ${[...oldModes]}`);
347+
const oldModesArray = [...oldModes];
348+
req.log.debug(`Got cached mode for ${channel} ${oldModesArray}`);
348349

349350
// For each cached mode we have for the room, that is no longer set: emit a disabled mode.
350-
promises.concat([...oldModes].map((oldModeChar) => {
351+
promises.push(...oldModesArray.map((oldModeChar) => {
351352
if (!MODES_TO_WATCH.includes(oldModeChar)) {
352353
return Promise.resolve();
353354
}

0 commit comments

Comments
 (0)