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 {
|
if let Some(members) = members {
|
||||||
let mut participants = Vec::with_capacity(members.len());
|
let mut participants = Vec::with_capacity(members.len());
|
||||||
let node = get_channel_node(channel.id()).await?.unwrap();
|
|
||||||
|
|
||||||
for user_id in members {
|
for user_id in members {
|
||||||
if let Some(voice_state) = get_voice_state(channel.id(), server, &user_id).await? {
|
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 {
|
Ok(Some(v0::ChannelVoiceState {
|
||||||
id: channel.id().to_string(),
|
id: channel.id().to_string(),
|
||||||
participants,
|
participants
|
||||||
node
|
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ auto_derived!(
|
|||||||
/// Token for authenticating with the voice server
|
/// Token for authenticating with the voice server
|
||||||
pub token: String,
|
pub token: String,
|
||||||
/// Url of the livekit server to connect to
|
/// Url of the livekit server to connect to
|
||||||
pub url: String
|
pub url: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Voice state for a channel
|
/// Voice state for a channel
|
||||||
@@ -324,13 +324,11 @@ auto_derived!(
|
|||||||
pub id: String,
|
pub id: String,
|
||||||
/// The states of the users who are connected to the channel
|
/// The states of the users who are connected to the channel
|
||||||
pub participants: Vec<UserVoiceState>,
|
pub participants: Vec<UserVoiceState>,
|
||||||
/// The node's node which the channel is currently using
|
|
||||||
pub node: String
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Join a voice channel
|
/// Join a voice channel
|
||||||
pub struct DataJoinCall {
|
pub struct DataJoinCall {
|
||||||
pub node: Option<String>
|
pub node: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user