소스 검색

Update SharePipeline, federate self boosts

Daniel Supernault 5 년 전
부모
커밋
0c59a55e6d
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      app/Jobs/SharePipeline/SharePipeline.php

+ 9 - 1
app/Jobs/SharePipeline/SharePipeline.php

@@ -61,7 +61,12 @@ class SharePipeline implements ShouldQueue
                   ->whereItemType('App\Status')
                   ->count();
 
-        if ($target->id === $status->profile_id || $exists !== 0) {
+        if ($target->id === $status->profile_id) {
+            $this->remoteAnnounceDeliver();
+            return true;
+        }
+
+        if( $exists !== 0) {
             return true;
         }
 
@@ -88,6 +93,9 @@ class SharePipeline implements ShouldQueue
 
     public function remoteAnnounceDeliver()
     {
+        if(config('federation.activitypub.enabled') == false) {
+            return true;
+        }
         $status = $this->status;
         $profile = $status->profile;