fix: remove node from channel voice state
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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>,
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user