소스 검색

Update InboxValidator job

Daniel Supernault 6 년 전
부모
커밋
21f211d354
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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;