1
0
Fork 0
forked from gitea/nas

#13 Turn searchability private if account is silenced

This commit is contained in:
KMY 2023-09-24 21:42:16 +09:00
parent a8f02d0245
commit a9b22883dc
2 changed files with 11 additions and 1 deletions

View file

@ -426,6 +426,7 @@ class Status < ApplicationRecord
def compute_searchability
local = account.local?
return 'private' if public_searchability? && account.silenced?
return 'direct' if unsupported_searchability?
return searchability if local && !searchability.nil?
return 'direct' if local || [:public, :private, :direct, :limited].exclude?(account.searchability.to_sym)