Add disallow unlisted-public post setting

This commit is contained in:
KMY 2023-07-04 16:32:35 +09:00
parent 8a6e52bd25
commit 2196665969
6 changed files with 13 additions and 0 deletions

View file

@ -83,6 +83,8 @@ class PostStatusService < BaseService
end
def searchability
return :private if @options[:searchability]&.to_sym == :public && @visibility&.to_sym == :unlisted && @account.user&.setting_disallow_unlisted_public_searchability
case @options[:searchability]&.to_sym
when :public
case @visibility&.to_sym when :public, :public_unlisted, :login, :unlisted then :public when :private then :private else :direct end