always save action

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/1784/head
Maxence Lange 2023-06-14 11:05:14 -01:00
rodzic afa5732a43
commit b5dc7d5209
1 zmienionych plików z 6 dodań i 12 usunięć

Wyświetl plik

@ -101,18 +101,6 @@ class AnnounceInterface extends AbstractActivityPubInterface implements IActivit
$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);
}
@ -191,6 +179,12 @@ class AnnounceInterface extends AbstractActivityPubInterface implements IActivit
return; // should not happen.
}
try {
$this->actionsRequest->getActionFromItem($item);
} catch (ActionDoesNotExistException $e) {
$this->actionsRequest->save($item);
}
$this->updateDetails($post);
$this->generateNotification($post, $actor);
}