async fn handle_client_connect(
    client: &session_types::Client,
    sessions: &data_types::SafeSessions,
) {
    println!("[event] {} connected", client.id);
    if let Some(session_id) = &client.session_id {
        if let Some(session) = sessions.write().await.get_mut(session_id) {
            session.set_client_active_status(&client.id, true);
        }
    }
}
/// If a client exists in a session, then set their status to active

If a client exists in a session, then set their status to active
If a client exists in a session then set their status to active
async fn handle_client_connect(
    client: &session_types::Client,
    sessions: &data_types::SafeSessions,
) {
    println!("[event] {} connected", client.id);
    if let Some(session_id) = &client.session_id {
        if let Some(session) = sessions.write().await.get_mut(session_id) {
            session.set_client_active_status(&client.id, true);
        }
    }
}
async fn handle_client_connect ( client : & session_types :: Client , sessions : & data_types :: SafeSessions , ) { println ! ( " " client id ) ; if let Some ( session_id ) = & client . session_id { if let Some ( session ) = sessions . write ( ) . await . get_mut ( session_id ) { session . set_client_active_status ( & client . id , true ) ; } } }
If a client exists in a session, then set their status to active
If a client exists in a session then set their status to active
client
&session_types::Client
sessions
&data_types::SafeSessions
client
&session_types::Client
sessions
&data_types::SafeSessions