mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-23 13:59:21 +00:00
23 lines
456 B
Rust
23 lines
456 B
Rust
//! # Call member information
|
|
//!
|
|
//! @author Pierre Hubert
|
|
use serde::Serialize;
|
|
|
|
use crate::data::user::UserID;
|
|
use crate::data::user_ws_connection::ActiveCall;
|
|
|
|
#[derive(Serialize)]
|
|
#[allow(non_snake_case)]
|
|
pub struct CallMemberInfo {
|
|
userID: u64,
|
|
ready: bool,
|
|
}
|
|
|
|
impl CallMemberInfo {
|
|
pub fn new(user_id: &UserID, call: &ActiveCall) -> Self {
|
|
Self {
|
|
userID: user_id.id(),
|
|
ready: call.ready,
|
|
}
|
|
}
|
|
} |