Update Inbox, add user domain blocks to Direct Message handler

This commit is contained in:
Daniel Supernault 2023-12-18 22:34:53 -07:00
parent e7c08fbbb2
commit a7f96d8194
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -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;
}