浏览代码

Update FollowPipeline

Daniel Supernault 6 年之前
父节点
当前提交
626bb4e700
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 1 1
      app/Jobs/FollowPipeline/FollowActivityPubDeliver.php
  2. 4 0
      app/Jobs/FollowPipeline/FollowPipeline.php

+ 1 - 1
app/Jobs/FollowPipeline/FollowActivityPubDeliver.php

@@ -49,7 +49,7 @@ class FollowActivityPubDeliver implements ShouldQueue
         $actor = $follow->actor;
         $target = $follow->target;
 
-        if($target->domain == null || $target->inbox_url == null) {
+        if($target->domain == null || $target->inbox_url == null || !$actor->private_key) {
         	return;
         }
 

+ 4 - 0
app/Jobs/FollowPipeline/FollowPipeline.php

@@ -46,6 +46,10 @@ class FollowPipeline implements ShouldQueue
         $actor = $follower->actor;
         $target = $follower->target;
 
+        if($target->domain || !$target->private_key) {
+            return;
+        }
+
         try {
             $notification = new Notification();
             $notification->profile_id = $target->id;