From b86a9d9524ac815b8286e9b9cab039ac62753312 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 12 Aug 2019 03:17:29 -0600 Subject: [PATCH 1/2] Update StatusPipeline --- app/Jobs/StatusPipeline/StatusDelete.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/StatusPipeline/StatusDelete.php b/app/Jobs/StatusPipeline/StatusDelete.php index cd596638..ab42c2d8 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; From 92c2fcaca776db2d96cefcb90bf6d9b9219334da Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 12 Aug 2019 19:26:57 -0600 Subject: [PATCH 2/2] Update Inbox --- app/Util/ActivityPub/Inbox.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 36c2bf9c..f378ab58 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();