feat: reimplement system messages

This commit is contained in:
Paul Makles
2022-04-21 16:36:59 +01:00
parent 5ce0c133e8
commit da08a7d722
5 changed files with 50 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ use revolt_quark::{
#[openapi(tag = "Groups")]
#[put("/<target>/recipients/<member>")]
pub async fn req(db: &Db, user: User, target: Ref, member: Ref) -> Result<EmptyResponse> {
let channel = target.as_channel(db).await?;
let mut channel = target.as_channel(db).await?;
perms(&user)
.channel(&channel)
.throw_permission_and_view_channel(db, Permission::InviteOthers)