feat: block mentions from low trust users (account created < 12 hours)

This commit is contained in:
Paul Makles
2024-02-10 01:04:52 +00:00
parent 513461c99a
commit 8f4d6c864b
4 changed files with 48 additions and 5 deletions

View File

@@ -444,6 +444,26 @@ impl<'a> DatabasePermissionQuery<'a> {
..self
}
}
/// Access the underlying user
pub fn user_ref(&self) -> &Option<Cow<User>> {
&self.user
}
/// Access the underlying server
pub fn channel_ref(&self) -> &Option<Cow<Channel>> {
&self.channel
}
/// Access the underlying server
pub fn server_ref(&self) -> &Option<Cow<Server>> {
&self.server
}
/// Access the underlying member
pub fn member_ref(&self) -> &Option<Cow<Member>> {
&self.member
}
}
/// Short-hand for creating a permission calculator