mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix(activity): do not loop affected userIDs twice
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
6911a33d50
commit
767dc3eaee
1 changed files with 3 additions and 4 deletions
|
|
@ -124,10 +124,8 @@ class Manager implements IManager {
|
|||
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 @@ class Manager implements IManager {
|
|||
foreach ($this->getConsumers() as $c) {
|
||||
if ($c instanceof IBulkConsumer) {
|
||||
$c->bulkReceive($event, $affectedUserIds, $setting);
|
||||
continue;
|
||||
}
|
||||
foreach ($affectedUserIds as $affectedUserId) {
|
||||
$event->setAffectedUser($affectedUserId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue