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,8 +85,10 @@ export class Heroes {
this._members.delete(userId);
}
for (const member of updatedHeroMembers) {
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);
}