feat: make Channel::server return a reference

This commit is contained in:
Zomatree
2025-02-07 21:35:51 +00:00
parent 2593a4272b
commit 060b4c43f4
7 changed files with 12 additions and 12 deletions

View File

@@ -55,7 +55,7 @@ pub async fn delete(
for user_id in get_voice_channel_members(channel.id()).await? {
voice_client.remove_user(&user_id, channel.id()).await?;
delete_voice_state(channel.id(), channel.server().as_deref(), &user.id).await?;
delete_voice_state(channel.id(), channel.server(), &user.id).await?;
};
Ok(EmptyResponse)

View File

@@ -76,7 +76,7 @@ pub async fn set_default_permissions(
}
let server = match channel.server() {
Some(server_id) => Some(Reference::from_unchecked(server_id).as_server(db).await?),
Some(server_id) => Some(Reference::from_unchecked(server_id.to_string()).as_server(db).await?),
None => None
};

View File

@@ -157,8 +157,8 @@ pub async fn edit(
roles,
timeout,
remove,
mut can_publish,
mut can_receive,
can_publish,
can_receive,
voice_channel,
} = data;