From 21f211d354634a36fb23d0e3dbc28bf25c3b7b43 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 9 Jun 2019 19:12:09 -0600 Subject: [PATCH 1/2] Update InboxValidator job --- app/Jobs/InboxPipeline/InboxValidator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Jobs/InboxPipeline/InboxValidator.php b/app/Jobs/InboxPipeline/InboxValidator.php index f9ddd2c02..54cf73348 100644 --- a/app/Jobs/InboxPipeline/InboxValidator.php +++ b/app/Jobs/InboxPipeline/InboxValidator.php @@ -99,7 +99,8 @@ class InboxValidator implements ShouldQueue } $actor = Profile::whereKeyId($keyId)->first(); if(!$actor) { - $actor = Helpers::profileFirstOrNew($bodyDecoded['actor']); + $actorUrl = is_array($bodyDecoded['actor']) ? $bodyDecoded['actor'][0] : $bodyDecoded['actor']; + $actor = Helpers::profileFirstOrNew($actorUrl); } if(!$actor) { return false; From 0e7f2bd0be4f1cbbdaf53562f66e91fe28c66999 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 9 Jun 2019 19:16:37 -0600 Subject: [PATCH 2/2] Update InboxValidator job --- app/Jobs/InboxPipeline/InboxValidator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/InboxPipeline/InboxValidator.php b/app/Jobs/InboxPipeline/InboxValidator.php index 54cf73348..718c73040 100644 --- a/app/Jobs/InboxPipeline/InboxValidator.php +++ b/app/Jobs/InboxPipeline/InboxValidator.php @@ -57,9 +57,9 @@ class InboxValidator implements ShouldQueue } if($this->verifySignature($headers, $profile, $payload) == true) { - InboxWorker::dispatch($headers, $profile, $payload); + InboxWorker::dispatchNow($headers, $profile, $payload)->onQueue('high'); } else if($this->blindKeyRotation($headers, $profile, $payload) == true) { - InboxWorker::dispatch($headers, $profile, $payload); + InboxWorker::dispatchNow($headers, $profile, $payload)->onQueue('high'); } else { return; }