Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
commit
dc20a0f261
26 changed files with 979 additions and 262 deletions
|
|
@ -15,6 +15,7 @@ use crate::{
|
|||
pub struct CallGroup {
|
||||
pub call_id: Uuid,
|
||||
pub members: RwLock<Vec<Arc<Caller>>>,
|
||||
#[allow(dead_code)]
|
||||
pub show: RwLock<bool>,
|
||||
pub anonymous_joining: RwLock<bool>,
|
||||
pub short_link: RwLock<Option<String>>,
|
||||
|
|
@ -100,6 +101,7 @@ pub fn call_invite_secret_from_cv(cv: &CommunicationValue) -> Option<CallSecretE
|
|||
}
|
||||
|
||||
impl CallGroup {
|
||||
#[allow(dead_code)]
|
||||
pub fn new(call_id: Uuid, user: Arc<Caller>) -> Self {
|
||||
Self::new_with_service(call_id, user, Arc::new(LiveKitService::new(None)))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ impl LiveKitService {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn garbage_collect_calls(self: Arc<Self>, manager: Arc<CallManager>) {
|
||||
tokio::spawn(async move {
|
||||
loop {
|
||||
|
|
@ -148,6 +149,7 @@ impl LiveKitService {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub async fn clean_calls(manager: &CallManager, room_service: RoomClient) {
|
||||
let rooms =
|
||||
match tokio::time::timeout(LIVEKIT_REQUEST_TIMEOUT, room_service.list_rooms(Vec::new()))
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ impl Caller {
|
|||
pub async fn set_timeout(&self, timeout: i64) {
|
||||
*self.timeout.write().await = timeout;
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
pub fn create_token(&self, livekit: &LiveKitService) -> Result<String, CallError> {
|
||||
livekit.create_token(self.user_id, self.call_id, self.has_admin())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue