diff --git a/app/Jobs/StatusPipeline/StatusDelete.php b/app/Jobs/StatusPipeline/StatusDelete.php index cd5966389..ab42c2d8a 100644 --- a/app/Jobs/StatusPipeline/StatusDelete.php +++ b/app/Jobs/StatusPipeline/StatusDelete.php @@ -104,7 +104,7 @@ class StatusDelete implements ShouldQueue Report::whereObjectType('App\Status') ->whereObjectId($status->id) ->delete(); - $status->delete(); + $status->forceDelete(); }); return true; diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 36c2bf9ce..f378ab58f 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/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();