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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb
index 2ded61850..f4a5e7c6c 100644
--- a/app/policies/status_policy.rb
+++ b/app/policies/status_policy.rb
@@ -9,6 +9,8 @@ class StatusPolicy
   end
 
   def show?
+    return false if local_only? && account.nil?
+
     if direct?
       owned? || status.mentions.where(account: account).exists?
     elsif private?
@@ -45,4 +47,8 @@ class StatusPolicy
   def private?
     status.private_visibility?
   end
+  
+  def local_only?
+    status.local_only?
+  end
 end