Leave room when connection is dropped

This commit is contained in:
Antonio Scandurra 2022-11-14 10:13:36 +01:00
parent 2145965749
commit 9902211af1
7 changed files with 184 additions and 235 deletions

View file

@ -53,7 +53,7 @@ impl Entity for Room {
fn release(&mut self, _: &mut MutableAppContext) {
if self.status.is_online() {
self.client.send(proto::LeaveRoom { id: self.id }).log_err();
self.client.send(proto::LeaveRoom {}).log_err();
}
}
}
@ -241,7 +241,7 @@ impl Room {
self.participant_user_ids.clear();
self.subscriptions.clear();
self.live_kit.take();
self.client.send(proto::LeaveRoom { id: self.id })?;
self.client.send(proto::LeaveRoom {})?;
Ok(())
}