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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user