Don't add a memeber to the members list if it left the DM

This commit is contained in:
Kaki In 2022-07-28 13:06:47 +02:00
parent bc385e2cdc
commit b73e3e9883

View File

@ -85,7 +85,9 @@ export class Heroes {
this._members.delete(userId); this._members.delete(userId);
} }
for (const member of updatedHeroMembers) { 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)); const sortedMembers = Array.from(this._members.values()).sort((a, b) => a.name.localeCompare(b.name));
this._roomName = calculateRoomName(sortedMembers, summaryData, log); this._roomName = calculateRoomName(sortedMembers, summaryData, log);