fix: exclude moderators from ignore_users
This commit is contained in:
parent
a091adc9d9
commit
85c1c72cc4
1 changed files with 6 additions and 11 deletions
|
@ -254,10 +254,6 @@ impl DataManager {
|
||||||
|
|
||||||
let owner = post.owner;
|
let owner = post.owner;
|
||||||
|
|
||||||
if ignore_users.contains(&owner) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(ua) = users.get(&owner) {
|
if let Some(ua) = users.get(&owner) {
|
||||||
out.push((
|
out.push((
|
||||||
post.clone(),
|
post.clone(),
|
||||||
|
@ -268,7 +264,9 @@ impl DataManager {
|
||||||
} else {
|
} else {
|
||||||
let ua = self.get_user_by_id(owner).await?;
|
let ua = self.get_user_by_id(owner).await?;
|
||||||
|
|
||||||
if ua.permissions.check_banned() {
|
if ua.permissions.check_banned() | ignore_users.contains(&owner)
|
||||||
|
&& !ua.permissions.check(FinePermission::MANAGE_POSTS)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,11 +355,6 @@ impl DataManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
let owner = post.owner;
|
let owner = post.owner;
|
||||||
|
|
||||||
if ignore_users.contains(&owner) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let community = post.community;
|
let community = post.community;
|
||||||
|
|
||||||
if let Some((ua, community)) = seen_before.get(&(owner, community)) {
|
if let Some((ua, community)) = seen_before.get(&(owner, community)) {
|
||||||
|
@ -375,7 +368,9 @@ impl DataManager {
|
||||||
} else {
|
} else {
|
||||||
let ua = self.get_user_by_id(owner).await?;
|
let ua = self.get_user_by_id(owner).await?;
|
||||||
|
|
||||||
if ua.permissions.check_banned() {
|
if ua.permissions.check_banned() | ignore_users.contains(&owner)
|
||||||
|
&& !ua.permissions.check(FinePermission::MANAGE_POSTS)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue