Compare commits

...
3 Commits
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -199,8 +199,8 @@ pub async fn ingress(
};
}
}
// Audio/video track was started/stopped
"track_published" | "track_unpublished" => {
// Audio/video track was started/stopped/unmuted/muted
"track_published" | "track_unpublished" | "track_unmuted" | "track_muted" => {
let channel_id = channel_id.to_internal_error()?;
let user_id = user_id.to_internal_error()?;
let track = event.track.as_ref().to_internal_error()?;
@@ -255,7 +255,7 @@ pub async fn ingress(
channel_id,
channel.server(),
user_id,
event.event == "track_published", // to avoid duplicating this entire case twice
event.event == "track_published" || event.event == "track_unmuted", // to avoid duplicating this entire case twice
track.source,
)
.await?;
@@ -103,7 +103,7 @@ pub async fn call(
log::debug!("Created room {}", room.name);
if let Some(recipients) = recipients {
if room.num_participants == 0 {
if room.num_participants == 0 && !recipients.is_empty() {
set_call_notification_recipients(channel.id(), &user.id, &recipients).await?;
}
}
@@ -221,7 +221,7 @@ pub async fn edit(
to: new_voice_channel.id().to_string(),
token,
}
.p_user(target_user.id.clone(), db)
.private(target_user.id.clone())
.await;
};
} else if can_publish.is_some() || can_receive.is_some() || remove_contains_voice {