diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2023-06-14 11:05:14 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2023-06-14 11:05:14 -0100 |
commit | b5dc7d5209e5a534966f35445c43809a606f01fc (patch) | |
tree | ece62aa93d09fe61246c10d7b580641e4188e3d5 | |
parent | afa5732a432c51200de48ae41a698e8a74ac7f01 (diff) |
always save action
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | lib/Interfaces/Object/AnnounceInterface.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Interfaces/Object/AnnounceInterface.php b/lib/Interfaces/Object/AnnounceInterface.php index e27ad929..46d94e78 100644 --- a/lib/Interfaces/Object/AnnounceInterface.php +++ b/lib/Interfaces/Object/AnnounceInterface.php @@ -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); } |