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 5573289b6..307876856 100644
--- a/app/policies/status_policy.rb
+++ b/app/policies/status_policy.rb
@@ -6,6 +6,8 @@ class StatusPolicy < ApplicationPolicy
   end
 
   def show?
+    return false if local_only? && current_account.nil?
+
     if direct?
       owned? || record.mentions.where(account: current_account).exists?
     elsif private?
@@ -46,4 +48,8 @@ class StatusPolicy < ApplicationPolicy
   def author
     record.account
   end
+  
+  def local_only?
+    record.local_only?
+  end
 end