mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Relay messages from RTC proxy to user
This commit is contained in:
@ -60,4 +60,5 @@ pub mod res_get_ws_token;
|
||||
pub mod user_calls_config;
|
||||
pub mod joined_call_message;
|
||||
pub mod call_member_info;
|
||||
pub mod left_call_message;
|
||||
pub mod left_call_message;
|
||||
pub mod new_call_signal;
|
27
src/api_data/new_call_signal.rs
Normal file
27
src/api_data/new_call_signal.rs
Normal file
@ -0,0 +1,27 @@
|
||||
//! # New call signal
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::data::conversation::ConvID;
|
||||
use crate::data::error::Res;
|
||||
use crate::data::user::UserID;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[allow(non_snake_case)]
|
||||
pub struct NewCallSignalAPI {
|
||||
callID: u64,
|
||||
peerID: u64,
|
||||
data: serde_json::Value,
|
||||
}
|
||||
|
||||
impl NewCallSignalAPI {
|
||||
pub fn new(call_id: &ConvID, peer_id: &UserID, data: &str) -> Res<Self> {
|
||||
Ok(Self {
|
||||
callID: call_id.clone(),
|
||||
peerID: peer_id.id(),
|
||||
data: serde_json::from_str(data)?,
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user