about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/status_policy.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb
index 400f1ec79..d3a3b36c0 100644
--- a/app/policies/status_policy.rb
+++ b/app/policies/status_policy.rb
@@ -13,6 +13,7 @@ class StatusPolicy < ApplicationPolicy
 
   def show?
     return false if author.suspended?
+    return false if local_only? && (current_account.nil? || !current_account.local?)
 
     if requires_mention?
       owned? || mention_exists?
@@ -96,4 +97,8 @@ class StatusPolicy < ApplicationPolicy
   def author
     record.account
   end
+  
+  def local_only?
+    record.local_only?
+  end
 end