if ($userIDs === []) {
return;
}
+ foreach ($userIDs as $userID) {
+ $user = UserProfileRuntimeCache::getInstance()->getObject($userID);
+ ModerationQueueManager::getInstance()->setAssignment([$queue->queueID => 1], $user->getDecoratedObject());
+ }
+
UserNotificationHandler::getInstance()->fireEvent(
'report',
'com.woltlab.wcf.moderation.queue',
use TTestableModerationQueueUserNotificationEvent;
use TTestableUserNotificationEvent;
- private ViewableModerationQueue $viewableModerationQueue;
+ private ?ViewableModerationQueue $viewableModerationQueue;
#[\Override]
public function getTitle(): string
{
#[\Override]
public function checkAccess()
{
+ if ($this->getViewableModerationQueue() === null) {
+ return false;
+ }
$objectType = ObjectTypeCache::getInstance()->getObjectType($this->getUserNotificationObject()->objectTypeID);
$processor = $objectType->getProcessor();
\assert($processor instanceof IModerationQueueHandler);
);
}
- private function getViewableModerationQueue(): ViewableModerationQueue
+ private function getViewableModerationQueue(): ?ViewableModerationQueue
{
if (!isset($this->viewableModerationQueue)) {
$this->viewableModerationQueue = ViewableModerationQueue::getViewableModerationQueue(