mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 21:47:02 +00:00
fix: use existing node if someone is already in the voice channel
This commit is contained in:
@@ -42,6 +42,10 @@ impl VoiceClient {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
!self.rooms.is_empty()
|
||||
}
|
||||
|
||||
pub async fn from_revolt_config() -> Self {
|
||||
let config = config().await;
|
||||
|
||||
@@ -89,8 +93,7 @@ impl VoiceClient {
|
||||
Channel::TextChannel { voice: Some(voice), .. } => Some(Cow::Borrowed(voice)),
|
||||
_ => None
|
||||
}
|
||||
|
||||
.ok_or_else(|| create_error!(NotAVoiceChannel))?;
|
||||
.ok_or_else(|| create_error!(NotAVoiceChannel))?;
|
||||
|
||||
room.client
|
||||
.create_room(
|
||||
|
||||
Reference in New Issue
Block a user