From 491468612f99dc5ae88fde79672767a74f943a8e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 18 Dec 2023 22:49:31 -0700 Subject: [PATCH] Update Inbox, add user domain blocks to Undo handler --- app/Util/ActivityPub/Inbox.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index defb75fa4..09676301f 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -836,6 +836,9 @@ class Inbox if(!$status) { return; } + if(AccountService::blocksDomain($status->profile_id, $profile->domain) == true) { + return; + } FeedRemoveRemotePipeline::dispatch($status->id, $status->profile_id)->onQueue('feed'); Status::whereProfileId($profile->id) ->whereReblogOfId($status->id) @@ -857,6 +860,9 @@ class Inbox if(!$following) { return; } + if(AccountService::blocksDomain($following->id, $profile->domain) == true) { + return; + } Follower::whereProfileId($profile->id) ->whereFollowingId($following->id) ->delete(); @@ -882,6 +888,9 @@ class Inbox if(!$status) { return; } + if(AccountService::blocksDomain($status->profile_id, $profile->domain) == true) { + return; + } Like::whereProfileId($profile->id) ->whereStatusId($status->id) ->forceDelete();