Skip to content

Commit

Permalink
Ensure that when SSS omits heroes we don't forget we had heroes
Browse files Browse the repository at this point in the history
Otherwise when the room next appears the name/avatar reset to
'Empty Room' with no avatar.
  • Loading branch information
kegsay committed Sep 16, 2024
1 parent 581b419 commit 39b4e9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ export class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandlerMap> {
if (Number.isInteger(invitedCount)) {
this.currentState.setInvitedMemberCount(invitedCount!);
}
if (Array.isArray(heroes)) {
if (Array.isArray(heroes) && heroes.length > 0) {
// filter out ourselves just in case
this.heroes = heroes.filter((h) => {
return h.userId != this.myUserId;
Expand Down

0 comments on commit 39b4e9d

Please sign in to comment.