Change: #68 限定投稿の検索許可を反応者に設定可能に (#120)

This commit is contained in:
KMY(雪あすか) 2023-10-15 14:17:57 +09:00 committed by GitHub
parent a772f7258f
commit d0f0dd723c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -631,12 +631,10 @@ class Status < ApplicationRecord
self.searchability = if %w(public public_unlisted login unlisted).include?(visibility)
searchability
elsif visibility == 'limited'
:limited
elsif visibility == 'limited' || visibility == 'direct'
searchability == 'limited' ? :limited : :direct
elsif visibility == 'private'
searchability == 'public' || searchability == 'public_unlisted' ? :private : searchability
elsif visibility == 'direct'
searchability == 'limited' ? :limited : :direct
else
:direct
end