move voice states to global

This commit is contained in:
Zomatree
2024-04-09 22:36:48 +01:00
parent ad0dcad497
commit ae87bc0b67
6 changed files with 62 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
use super::File;
use super::{File, UserVoiceState};
use revolt_permissions::{Override, OverrideField};
use std::collections::{HashMap, HashSet};
@@ -306,10 +306,18 @@ auto_derived!(
}
/// Voice server token response
pub struct LegacyCreateVoiceUserResponse {
pub struct CreateVoiceUserResponse {
/// Token for authenticating with the voice server
token: String,
pub token: String,
}
/// Voice state for a channel
pub struct ChannelVoiceState {
pub id: String,
/// The states of the users who are connected to the channel
pub participants: Vec<UserVoiceState>
}
);
impl Channel {