Fix public posts from silenced accounts not being changed to unlisted visibility (#13096)
This commit is contained in:
		
							parent
							
								
									aa67036b41
								
							
						
					
					
						commit
						5284e29e2f
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -50,7 +50,7 @@ class PostStatusService < BaseService
 | 
				
			||||||
  def preprocess_attributes!
 | 
					  def preprocess_attributes!
 | 
				
			||||||
    @text         = @options.delete(:spoiler_text) if @text.blank? && @options[:spoiler_text].present?
 | 
					    @text         = @options.delete(:spoiler_text) if @text.blank? && @options[:spoiler_text].present?
 | 
				
			||||||
    @visibility   = @options[:visibility] || @account.user&.setting_default_privacy
 | 
					    @visibility   = @options[:visibility] || @account.user&.setting_default_privacy
 | 
				
			||||||
    @visibility   = :unlisted if @visibility == :public && @account.silenced?
 | 
					    @visibility   = :unlisted if @visibility&.to_sym == :public && @account.silenced?
 | 
				
			||||||
    @scheduled_at = @options[:scheduled_at]&.to_datetime
 | 
					    @scheduled_at = @options[:scheduled_at]&.to_datetime
 | 
				
			||||||
    @scheduled_at = nil if scheduled_in_the_past?
 | 
					    @scheduled_at = nil if scheduled_in_the_past?
 | 
				
			||||||
  rescue ArgumentError
 | 
					  rescue ArgumentError
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue