Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Dec 14, 2023
1 parent a6a0647 commit dbf1234
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/backend/src/room/Room.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Room
return user_ptr->getId() == user.getId();
}
), this->users.end());
// No need to check if owner is in room, because if owner leaves, the room is deleted anyways after
if (this->owner->getId() == user.getId()) {
if (!this->isEmpty())
this->owner = this->users[0];
Expand Down

0 comments on commit dbf1234

Please sign in to comment.