瀏覽代碼

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;