Daniel Supernault 5 år sedan
förälder
incheckning
92c2fcaca7
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      app/Util/ActivityPub/Inbox.php

+ 4 - 4
app/Util/ActivityPub/Inbox.php

@@ -274,10 +274,10 @@ class Inbox
             return;
         }
 
-        $follower = new Follower();
-        $follower->profile_id = $actor->id;
-        $follower->following_id = $target->id;
-        $follower->save();
+        $follower = Follower::firstOrCreate([
+            'profile_id' => $actor->id,
+            'following_id' => $target->id,
+        ]);
         FollowPipeline::dispatch($follower);
 
         $request->delete();