Преглед изворни кода

Merge pull request #1123 from pixelfed/frontend-ui-refactor

Frontend ui refactor
daniel пре 6 година
родитељ
комит
15d4aff821

+ 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;

+ 5 - 0
app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php

@@ -186,6 +186,11 @@ class RemoteFollowImportRecent implements ShouldQueue
                 Log::info('Invalid media, skipping. '.$mime);
                 continue;
             }
+            if (Helpers::validateUrl($url) == false) {
+                Log::info('Skipping invalid attachment URL: ' . $url);
+                continue;
+            }
+            
             $count++;
 
             if ($count === 1) {