forked from jmug/stoatchat
Permissions: Resolve guild, allows ability to delete channels, delete others messages, etc.
This commit is contained in:
@@ -17,6 +17,12 @@ pub async fn req(user: User, target: Ref) -> Result<JsonValue> {
|
||||
}
|
||||
|
||||
let target = target.fetch_channel().await?;
|
||||
match target {
|
||||
Channel::SavedMessages { .. }
|
||||
| Channel::TextChannel { .. } => return Err(Error::CannotJoinCall),
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let perm = permissions::PermissionCalculator::new(&user)
|
||||
.with_channel(&target)
|
||||
.for_channel()
|
||||
|
||||
Reference in New Issue
Block a user