Unlisted visibility with public searchability
This commit is contained in:
parent
c8d30bed3c
commit
ca66c47649
2 changed files with 2 additions and 2 deletions
|
@ -528,7 +528,7 @@ class Status < ApplicationRecord
|
|||
def set_searchability
|
||||
return if searchability.nil?
|
||||
|
||||
if visibility == 'public' || visibility == 'public_unlisted' || visibility == 'login'
|
||||
if visibility == 'public' || visibility == 'public_unlisted' || visibility == 'login' || (visibility == 'unlisted' && account.local?)
|
||||
self.searchability = [Status.searchabilities[searchability], Status.visibilities['public']].max
|
||||
elsif visibility == 'limited'
|
||||
self.searchability = Status.searchabilities['limited']
|
||||
|
|
|
@ -85,7 +85,7 @@ class PostStatusService < BaseService
|
|||
def searchability
|
||||
case @options[:searchability]&.to_sym
|
||||
when :public
|
||||
case @visibility&.to_sym when :public, :public_unlisted, :login then :public when :unlisted, :private then :private else :direct end
|
||||
case @visibility&.to_sym when :public, :public_unlisted, :login, :unlisted then :public when :private then :private else :direct end
|
||||
when :private
|
||||
case @visibility&.to_sym when :public, :public_unlisted, :login, :unlisted, :private then :private else :direct end
|
||||
when :direct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue