$eventHandler = EventHandler::getInstance();
$eventHandler->register(RebuildWorkerCollecting::class, static function (RebuildWorkerCollecting $event) {
- $event->register(\wcf\system\worker\ConversationMessageRebuildDataWorker::class, -5);
- $event->register(\wcf\system\worker\ConversationRebuildDataWorker::class, 0);
- $event->register(\wcf\system\worker\ConversationMessageSearchIndexRebuildDataWorker::class, 300);
+ $event->register(wcf\system\worker\ConversationMessageRebuildDataWorker::class, -5);
+ $event->register(wcf\system\worker\ConversationRebuildDataWorker::class, 0);
+ $event->register(wcf\system\worker\ConversationMessageSearchIndexRebuildDataWorker::class, 300);
});
};
// update last visit time count
if (
$this->conversation->isNew()
- && ($this->objectList->getMaxPostTime() > $this->conversation->lastVisitTime
+ && (
+ $this->objectList->getMaxPostTime() > $this->conversation->lastVisitTime
|| ($this->conversation->joinedAt && !\count($this->objectList))
)
) {