add: user is_deactivated

This commit is contained in:
trisua 2025-07-19 03:17:21 -04:00
parent 9ccbc69405
commit 63d3c2350d
13 changed files with 243 additions and 30 deletions

View file

@ -192,6 +192,19 @@ macro_rules! user_banned {
#[macro_export]
macro_rules! check_user_blocked_or_private {
($user:expr, $other_user:ident, $data:ident, $jar:ident) => {
// check is_deactivated
if $other_user.is_deactivated {
return Err(Html(
render_error(
Error::GeneralNotFound("user".to_string()),
&$jar,
&$data,
&$user,
)
.await,
));
}
// check require_account
if $user.is_none() && $other_user.settings.require_account {
return Err(Html(