From b58cabdc414dd11bc84fe0964109ee23213db815 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 6 Nov 2023 09:57:23 +0000 Subject: [PATCH] Ensure to always have stored the receivers --- src/Content/Item.php | 2 -- src/Model/Item.php | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index d28ec4066..ab5ff1698 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -1049,8 +1049,6 @@ class Item Tag::createImplicitMentions($post['uri-id'], $post['thr-parent-id']); } - ActivityPub\Transmitter::storeReceiversForItem($post); - Hook::callAll('post_local_end', $post); $author = DBA::selectFirst('contact', ['thumb'], ['uid' => $post['uid'], 'self' => true]); diff --git a/src/Model/Item.php b/src/Model/Item.php index 18b56215c..491050c58 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1414,10 +1414,12 @@ class Item } if (!empty($source) && ($transmit || DI::config()->get('debug', 'store_source'))) { - Post\Activity::insert($item['uri-id'], $source); + Post\Activity::insert($posted_item['uri-id'], $source); } if ($transmit) { + ActivityPub\Transmitter::storeReceiversForItem($posted_item); + Worker::add(['priority' => $priority, 'dont_fork' => true], 'Notifier', $notify_type, (int)$posted_item['uri-id'], (int)$posted_item['uid']); }