add: hide posts from users who have blocked you from timelines
This commit is contained in:
parent
22ae479bd7
commit
8de5c0ea76
10 changed files with 84 additions and 81 deletions
|
@ -224,3 +224,29 @@ macro_rules! check_user_blocked_or_private {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! ignore_users_gen {
|
||||
($user:ident, $data:ident) => {
|
||||
if let Some(ref ua) = $user {
|
||||
[
|
||||
$data.0.get_userblocks_receivers(ua.id).await,
|
||||
$data.0.get_userblocks_initiator_by_receivers(ua.id).await,
|
||||
]
|
||||
.concat()
|
||||
} else {
|
||||
Vec::new()
|
||||
}
|
||||
};
|
||||
|
||||
($user:ident!, $data:ident) => {
|
||||
[
|
||||
$data.0.get_userblocks_receivers($user.id).await,
|
||||
$data
|
||||
.0
|
||||
.get_userblocks_initiator_by_receivers($user.id)
|
||||
.await,
|
||||
]
|
||||
.concat()
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue