diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs index cc7445dbcc..e7899ab2d8 100644 --- a/crates/call/src/room.rs +++ b/crates/call/src/room.rs @@ -172,7 +172,7 @@ impl Room { cx.spawn(|this, mut cx| async move { connect.await?; - if !cx.read(|cx| settings::get::(cx).mute_on_join) { + if !cx.read(Self::mute_on_join) { this.update(&mut cx, |this, cx| this.share_microphone(cx)) .await?; } @@ -301,6 +301,10 @@ impl Room { }) } + pub fn mute_on_join(cx: &AppContext) -> bool { + settings::get::(cx).mute_on_join || client::IMPERSONATE_LOGIN.is_some() + } + fn from_join_response( response: proto::JoinRoomResponse, client: Arc, @@ -1124,7 +1128,7 @@ impl Room { self.live_kit .as_ref() .and_then(|live_kit| match &live_kit.microphone_track { - LocalTrack::None => Some(settings::get::(cx).mute_on_join), + LocalTrack::None => Some(Self::mute_on_join(cx)), LocalTrack::Pending { muted, .. } => Some(*muted), LocalTrack::Published { muted, .. } => Some(*muted), })