chore: commit the things that are to be commited

This commit is contained in:
Paul Makles
2022-02-11 23:33:38 +00:00
parent 28db08ba88
commit 50d9f50c8f
9 changed files with 46 additions and 24 deletions

View File

@@ -77,25 +77,25 @@ pub async fn req(db: &Db, target: Ref) -> Result<Json<InviteResponse>> {
_ => unreachable!(),
}
}
Invite::Group { channel, creator, .. } => {
Invite::Group {
channel, creator, ..
} => {
let channel = db.fetch_channel(&channel).await?;
let user = db.fetch_user(&creator).await?;
match channel {
| Channel::Group {
Channel::Group {
id,
name,
description,
..
} => {
InviteResponse::Group {
channel_id: id,
channel_name: name,
channel_description: description,
user_name: user.username,
user_avatar: user.avatar,
}
}
} => InviteResponse::Group {
channel_id: id,
channel_name: name,
channel_description: description,
user_name: user.username,
user_avatar: user.avatar,
},
_ => unreachable!(),
}
}