Explorar o código

Update InboxValidator job

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
21f211d354
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      app/Jobs/InboxPipeline/InboxValidator.php

+ 2 - 1
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;