feat: add role colours to masquerades

feat: add `joined_at` property to members
feat: add `timeout` property to members (non-functional)
This commit is contained in:
Paul Makles
2022-07-15 13:42:01 +01:00
parent 692081b7f0
commit 741b8ee8fd
14 changed files with 82 additions and 49 deletions

View File

@@ -100,10 +100,16 @@ pub async fn message_send(
}
// 2. Verify permissions for masquerade.
if message.masquerade.is_some() {
if let Some(masq) = &message.masquerade {
permissions
.throw_permission(db, Permission::Masquerade)
.await?;
if masq.colour.is_some() {
permissions
.throw_permission(db, Permission::ManageRole)
.await?;
}
}
// 3. Verify replies are valid.