mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-25 23:09:22 +00:00
Close call of removed conversation
This commit is contained in:
parent
0d8a514392
commit
60541d1651
@ -462,6 +462,21 @@ pub fn handle_event(e: &events_helper::Event) -> Res {
|
||||
}
|
||||
}
|
||||
|
||||
// Call active call of user (if any)
|
||||
Event::DeletedConversation(conv_id) => {
|
||||
let mut conn = None;
|
||||
user_ws_controller::foreach_connection(|f| {
|
||||
if f.is_having_call_with_conversation(conv_id) {
|
||||
conn = Some(f.clone());
|
||||
}
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
if let Some(c) = conn {
|
||||
make_user_leave_call(conv_id, &c)?;
|
||||
}
|
||||
}
|
||||
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user