Skip to content

Commit

Permalink
Merge pull request #1784 from nextcloud/fix/noid/save-action-in-local
Browse files Browse the repository at this point in the history
always save action
  • Loading branch information
ArtificialOwl committed Jun 14, 2023
2 parents f4e2680 + b5dc7d5 commit c53e47c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions lib/Interfaces/Object/AnnounceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,6 @@ public function processIncomingRequest(ACore $item): void {
$item->checkOrigin($item->getId());
$item->checkOrigin($item->getActorId());

try {
$this->actionsRequest->getActionFromItem($item);
} catch (ActionDoesNotExistException $e) {
$this->actionsRequest->save($item);

try {
$post = $this->streamRequest->getStreamById($item->getObjectId());
$this->updateDetails($post);
} catch (Exception $e) {
}
}

$this->save($item);
}

Expand Down Expand Up @@ -191,6 +179,12 @@ public function save(ACore $item): void {
return; // should not happen.
}

try {
$this->actionsRequest->getActionFromItem($item);
} catch (ActionDoesNotExistException $e) {
$this->actionsRequest->save($item);
}

$this->updateDetails($post);
$this->generateNotification($post, $actor);
}
Expand Down

0 comments on commit c53e47c

Please sign in to comment.