summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2023-06-14 11:25:26 -0100
committerGitHub <noreply@github.com>2023-06-14 11:25:26 -0100
commitc53e47cfa95d8a396bbcbf723986d32cc76974c6 (patch)
treeca4054e09c42a19106228bd466043c1d97f71c86
parentf4e2680f371836d3f96f07713e5e4b724a647120 (diff)
parentb5dc7d5209e5a534966f35445c43809a606f01fc (diff)
Merge pull request #1784 from nextcloud/fix/noid/save-action-in-local
always save action
-rw-r--r--lib/Interfaces/Object/AnnounceInterface.php18
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);
}