use wcf\data\moderation\queue\ViewableModerationQueue;
use wcf\data\object\type\ObjectTypeCache;
use wcf\system\cache\runtime\CommentRuntimeCache;
+use wcf\system\cache\runtime\UserProfileRuntimeCache;
use wcf\system\comment\manager\ICommentManager;
use wcf\system\WCF;
return WCF::getTPL()->fetch('moderationComment');
}
+
+ #[\Override]
+ public function isAffectedUser(ModerationQueue $queue, $userID)
+ {
+ if (!parent::isAffectedUser($queue, $userID)) {
+ return false;
+ }
+ $comment = $this->getComment($queue->objectID);
+ if ($comment === null) {
+ return false;
+ }
+
+ return $this->getCommentManager($comment)->canModerate(
+ $comment->objectTypeID,
+ $comment->objectID,
+ UserProfileRuntimeCache::getInstance()->getObject($userID)
+ );
+ }
}