From 28c9b9ce6a56a06a4c6e2e5192b1984d99ee9047 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 16 Feb 2019 22:13:00 +0000 Subject: improve filtering --- app/policies/status_policy.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/policies/status_policy.rb') diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb index 5e3282681..fcf19db62 100644 --- a/app/policies/status_policy.rb +++ b/app/policies/status_policy.rb @@ -14,7 +14,7 @@ class StatusPolicy < ApplicationPolicy def show? return false if local_only? && (current_account.nil? || !current_account.local?) - if requires_mention? + if direct? owned? || mention_exists? elsif private? owned? || following_author? || mention_exists? @@ -24,7 +24,7 @@ class StatusPolicy < ApplicationPolicy end def reblog? - !requires_mention? && (!private? || owned?) && show? && !blocking_author? + !direct? && (!private? || owned?) && show? && !blocking_author? end def favourite? @@ -43,8 +43,8 @@ class StatusPolicy < ApplicationPolicy private - def requires_mention? - record.direct_visibility? || record.limited_visibility? + def direct? + record.direct_visibility? end def owned? -- cgit