diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php index 7471b7d708a1d..2dfc5c2609769 100644 --- a/lib/private/Activity/Manager.php +++ b/lib/private/Activity/Manager.php @@ -124,10 +124,8 @@ public function bulkPublish(IEvent $event, array $affectedUserIds, ISetting $set throw new IncompleteActivityException('The given event is invalid'); } - if ($event->getAuthor() === '') { - if ($this->session->getUser() instanceof IUser) { - $event->setAuthor($this->session->getUser()->getUID()); - } + if (($event->getAuthor() === '') && $this->session->getUser() instanceof IUser) { + $event->setAuthor($this->session->getUser()->getUID()); } if (!$event->getTimestamp()) { @@ -141,6 +139,7 @@ public function bulkPublish(IEvent $event, array $affectedUserIds, ISetting $set foreach ($this->getConsumers() as $c) { if ($c instanceof IBulkConsumer) { $c->bulkReceive($event, $affectedUserIds, $setting); + continue; } foreach ($affectedUserIds as $affectedUserId) { $event->setAffectedUser($affectedUserId);