From a7f96d81949af8029edcbbaabc50ad63030485f9 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 18 Dec 2023 22:34:53 -0700 Subject: [PATCH] Update Inbox, add user domain blocks to Direct Message handler --- app/Util/ActivityPub/Inbox.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 0dd4722e9..c0ad390b8 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -372,7 +372,11 @@ class Inbox ->whereUsername(array_last(explode('/', $activity['to'][0]))) ->firstOrFail(); - if(in_array($actor->id, $profile->blockedIds()->toArray())) { + if(!$actor || in_array($actor->id, $profile->blockedIds()->toArray())) { + return; + } + + if(AccountService::blocksDomain($profile->id, $actor->domain) == true) { return; }