فهرست منبع

Update Inbox, add user domain blocks to Direct Message handler

Daniel Supernault 1 سال پیش
والد
کامیت
a7f96d8194
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      app/Util/ActivityPub/Inbox.php

+ 5 - 1
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;
         }