소스 검색

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