diff options
author | Surinna Curtis <ekiru.0@gmail.com> | 2017-11-16 01:21:16 -0600 |
---|---|---|
committer | Surinna Curtis <ekiru.0@gmail.com> | 2017-11-16 01:21:16 -0600 |
commit | 35fbdc36f92b610e8a73e2acb220e87cf5fc83b0 (patch) | |
tree | fcd9bdb5ba49ab7a6a79590c74db858ae77b4239 /app/policies | |
parent | 30237259367a0ef2b20908518b86bbeb358999b5 (diff) | |
parent | 88627fd7aa2493a6890d60a5965459e4c7fe6fe9 (diff) |
Merge tootsuite/master at 30237259367a0ef2b20908518b86bbeb358999b5
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/status_policy.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb index 0373fdf04..8e0c1eef1 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? && 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 |