forked from jmug/stoatchat
feat: track join time
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
use revolt_database::{
|
||||
util::{permissions::DatabasePermissionQuery, reference::Reference},
|
||||
voice::{
|
||||
delete_voice_state, get_channel_node, get_voice_channel_members, is_in_voice_channel,
|
||||
VoiceClient,
|
||||
delete_channel_voice_state, delete_voice_state, get_channel_node, get_voice_channel_members, is_in_voice_channel, VoiceClient
|
||||
},
|
||||
Channel, Database, PartialChannel, User, AMQP,
|
||||
};
|
||||
@@ -63,6 +62,7 @@ pub async fn delete(
|
||||
voice_client
|
||||
.remove_user(&node, &user.id, channel.id())
|
||||
.await?;
|
||||
|
||||
delete_voice_state(channel.id(), None, &user.id).await?;
|
||||
};
|
||||
}
|
||||
@@ -73,10 +73,9 @@ pub async fn delete(
|
||||
if let Some(users) = get_voice_channel_members(channel.id()).await? {
|
||||
let node = get_channel_node(channel.id()).await?.unwrap();
|
||||
|
||||
for user in users {
|
||||
voice_client.remove_user(&node, &user, channel.id()).await?;
|
||||
delete_voice_state(channel.id(), channel.server(), &user).await?;
|
||||
}
|
||||
voice_client.delete_room(&node, channel.id()).await?;
|
||||
|
||||
delete_channel_voice_state(channel.id(), channel.server(), &users).await?;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user