From f0a2a6c875e9294f0ea1d4c6bc90529e41a2dc37 Mon Sep 17 00:00:00 2001 From: beatrix Date: Mon, 9 Oct 2017 09:56:17 -0400 Subject: try to tighten up local only toot stuff, like... properly (#163) * try to tighten up local only toot stuff, like... properly * try to un-break tests --- app/policies/status_policy.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/policies') 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 -- cgit