diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb index 64a5111fc8..118b79f3ed 100644 --- a/app/policies/status_policy.rb +++ b/app/policies/status_policy.rb @@ -17,7 +17,7 @@ class StatusPolicy < ApplicationPolicy elsif private? owned? || following_author? || mention_exists? else - current_account.nil? || !author_blocking? + current_account.nil? || (!author_blocking? && !author_blocking_domain?) end end @@ -63,6 +63,12 @@ class StatusPolicy < ApplicationPolicy end end + def author_blocking_domain? + return false if current_account.nil? || current_account.domain.nil? + + author.blocking_domain?(current_account.domain) + end + def blocking_author? return false if current_account.nil?