Skip to content

Commit

Permalink
always save action
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Jun 14, 2023
1 parent afa5732 commit b5dc7d5
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 b5dc7d5

Please sign in to comment.