Delete room when no participants are left

This commit is contained in:
Antonio Scandurra
2022-10-18 14:59:12 +02:00
parent 9cf39b1da6
commit 48a1dd1588
5 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -495,7 +495,7 @@ impl Store {
}
});
let room = if room.participants.is_empty() && room.pending_participant_user_ids.is_empty() {
let room = if room.participants.is_empty() {
Cow::Owned(self.rooms.remove(&room_id).unwrap())
} else {
Cow::Borrowed(self.rooms.get(&room_id).unwrap())