1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-29 08:46:27 +00:00

Close call of removed conversation

This commit is contained in:
Pierre HUBERT 2021-03-13 12:24:20 +01:00
parent 0d8a514392
commit 60541d1651

View File

@ -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)?;
}
}
_ => {} _ => {}
} }