Except for unlisted from search results

This commit is contained in:
KMY 2023-04-05 14:29:24 +09:00
parent 08e5d96a4a
commit 5e8bdaaab6
3 changed files with 19 additions and 1 deletions

View file

@ -19,6 +19,10 @@ class StatusPolicy < ApplicationPolicy
end
end
def search?
show? && (record.public_visibility? || record.public_unlisted_visibility?)
end
def reblog?
!requires_mention? && (!private? || owned?) && show? && !blocking_author?
end