diff --git a/src/matrix/room/members/Heroes.js b/src/matrix/room/members/Heroes.js index 1d2ab39e..97630edd 100644 --- a/src/matrix/room/members/Heroes.js +++ b/src/matrix/room/members/Heroes.js @@ -85,7 +85,9 @@ export class Heroes { this._members.delete(userId); } for (const member of updatedHeroMembers) { - this._members.set(member.userId, member); + if (!removedUserIds.includes(member.userId)) { + this._members.set(member.userId, member); + } } const sortedMembers = Array.from(this._members.values()).sort((a, b) => a.name.localeCompare(b.name)); this._roomName = calculateRoomName(sortedMembers, summaryData, log);