Skip to content

Commit

Permalink
Don't ban already banned user
Browse files Browse the repository at this point in the history
  • Loading branch information
RikudouSage committed Feb 18, 2024
1 parent 7389b33 commit 8f012c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Automod/ModAction/BanUser/BanUserForImageAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ public function shouldRun(object $object): bool
if (!$object instanceof PostView) {
return false;
}
if ($object->creator->banned) {
return false;
}
if (!$object->post->url) {
return false;
}

if (!count($this->imageRepository->findAll())) {
return false;
}
Expand Down

0 comments on commit 8f012c5

Please sign in to comment.