Only leave room on connections that are associated with the active call
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
4ef69c8361
commit
0491747eed
3 changed files with 21 additions and 7 deletions
|
@ -215,11 +215,13 @@ impl Store {
|
|||
let connected_user = self.connected_users.get(&user_id).unwrap();
|
||||
if let Some(active_call) = connected_user.active_call.as_ref() {
|
||||
let room_id = active_call.room_id;
|
||||
let left_room = self.leave_room(room_id, connection_id)?;
|
||||
result.hosted_projects = left_room.unshared_projects;
|
||||
result.guest_projects = left_room.left_projects;
|
||||
result.room_id = Some(room_id);
|
||||
result.canceled_call_connection_ids = left_room.canceled_call_connection_ids;
|
||||
if active_call.connection_id == Some(connection_id) {
|
||||
let left_room = self.leave_room(room_id, connection_id)?;
|
||||
result.hosted_projects = left_room.unshared_projects;
|
||||
result.guest_projects = left_room.left_projects;
|
||||
result.room_id = Some(room_id);
|
||||
result.canceled_call_connection_ids = left_room.canceled_call_connection_ids;
|
||||
}
|
||||
}
|
||||
|
||||
let connected_user = self.connected_users.get_mut(&user_id).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue