1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-09-25 22:29:45 +00:00

Can get the list of members of a call

This commit is contained in:
2021-02-10 17:32:14 +01:00
parent 2e5cdca850
commit 3c696bde5f
6 changed files with 67 additions and 2 deletions

View File

@@ -560,6 +560,16 @@ pub fn disconnect_user_from_all_sockets(user_id: &UserID) -> Res {
Ok(())
}
/// Do something with all active connections
pub fn foreach_connection<F>(mut f: F) -> Res
where F: FnMut(&UserWsConnection) -> Res {
for conn in get_ws_connections_list().lock().unwrap().iter() {
f(conn)?;
}
Ok(())
}
/// Events handler
pub fn handle_event(e: &events_helper::Event) -> Res {
match e {