Add disallow unlisted-public post setting
This commit is contained in:
parent
8a6e52bd25
commit
2196665969
6 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue