fix: remove node from channel voice state

This commit is contained in:
Zomatree
2025-06-05 17:26:37 +01:00
parent 3dbf3bb7a0
commit 901ac56154
2 changed files with 3 additions and 7 deletions

View File

@@ -293,7 +293,6 @@ pub async fn get_channel_voice_state(channel: &Channel) -> Result<Option<v0::Cha
if let Some(members) = members {
let mut participants = Vec::with_capacity(members.len());
let node = get_channel_node(channel.id()).await?.unwrap();
for user_id in members {
if let Some(voice_state) = get_voice_state(channel.id(), server, &user_id).await? {
@@ -307,8 +306,7 @@ pub async fn get_channel_voice_state(channel: &Channel) -> Result<Option<v0::Cha
Ok(Some(v0::ChannelVoiceState {
id: channel.id().to_string(),
participants,
node
participants
}))
} else {
Ok(None)

View File

@@ -316,7 +316,7 @@ auto_derived!(
/// Token for authenticating with the voice server
pub token: String,
/// Url of the livekit server to connect to
pub url: String
pub url: String,
}
/// Voice state for a channel
@@ -324,13 +324,11 @@ auto_derived!(
pub id: String,
/// The states of the users who are connected to the channel
pub participants: Vec<UserVoiceState>,
/// The node's node which the channel is currently using
pub node: String
}
/// Join a voice channel
pub struct DataJoinCall {
pub node: Option<String>
pub node: Option<String>,
}
);