Use backend from glitch-soc for instance-only toots

This commit is contained in:
Renato "Lond" Cerqueira
2018-08-23 19:30:09 +02:00
parent ccc2f608c5
commit ffaa814bbe
11 changed files with 90 additions and 11 deletions

View File

@ -12,6 +12,8 @@ class StatusPolicy < ApplicationPolicy
end
def show?
return false if local_only? && (current_account.nil? || !current_account.local?)
if direct?
owned? || mention_exists?
elsif private?
@ -84,4 +86,8 @@ class StatusPolicy < ApplicationPolicy
def author
record.account
end
def local_only?
record.local_only?
end
end