Sfoglia il codice sorgente

Update InboxValidator job

Daniel Supernault 6 anni fa
parent
commit
21f211d354
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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;