From f62d2494a494a1a3bab9aa70257b22e5f43d91c4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 13 Dec 2022 00:46:25 -0700 Subject: [PATCH 1/2] Update InboxPipeline, dispatch Follow/Accept Follow jobs to follow queue --- app/Jobs/InboxPipeline/InboxValidator.php | 6 ++- app/Jobs/InboxPipeline/SharedInboxWorker.php | 43 -------------------- 2 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 app/Jobs/InboxPipeline/SharedInboxWorker.php diff --git a/app/Jobs/InboxPipeline/InboxValidator.php b/app/Jobs/InboxPipeline/InboxValidator.php index 9d2bb61b5..21c43612d 100644 --- a/app/Jobs/InboxPipeline/InboxValidator.php +++ b/app/Jobs/InboxPipeline/InboxValidator.php @@ -78,7 +78,11 @@ class InboxValidator implements ShouldQueue } if($this->verifySignature($headers, $profile, $payload) == true) { - ActivityHandler::dispatch($headers, $profile, $payload)->onQueue('inbox'); + if(isset($payload['type']) && in_array($payload['type'], ['Follow', 'Accept']) ) { + ActivityHandler::dispatch($headers, $profile, $payload)->onQueue('follow'); + } else { + ActivityHandler::dispatch($headers, $profile, $payload)->onQueue('inbox'); + } return; } else { return; diff --git a/app/Jobs/InboxPipeline/SharedInboxWorker.php b/app/Jobs/InboxPipeline/SharedInboxWorker.php deleted file mode 100644 index 423919581..000000000 --- a/app/Jobs/InboxPipeline/SharedInboxWorker.php +++ /dev/null @@ -1,43 +0,0 @@ -request = $request; - $this->payload = $payload; - } - - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - (new Inbox($this->request, null, $this->payload))->handleSharedInbox(); - } -} From 75fdf2ec3416831704d9b2b994b10f3eaccf6827 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 13 Dec 2022 00:47:33 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90be3334d..75f89e17c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ - Update MediaStorageService, improve support for pleroma .blob avatars ([66226658](https://github.com/pixelfed/pixelfed/commit/66226658)) - Update ApiV1Controller, remove min avatar size limit, fixes #3715 ([2b0db812](https://github.com/pixelfed/pixelfed/commit/2b0db812)) - Update InboxPipeline, add inbox job queue and separate http sig validation from activity handling ([e6c1604d](https://github.com/pixelfed/pixelfed/commit/e6c1604d)) +- Update InboxPipeline, dispatch Follow/Accept Follow jobs to follow queue ([f62d2494](https://github.com/pixelfed/pixelfed/commit/f62d2494)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)