From 486753bbfe2d047795a4e8dac4531ccc12d3b493 Mon Sep 17 00:00:00 2001 From: Shlee Date: Wed, 15 Jul 2026 22:25:54 +0930 Subject: [PATCH] Fix CW being copied to body when editing quote posts with empty text (#39823) --- app/services/update_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/update_status_service.rb b/app/services/update_status_service.rb index 1f2dce08f8a..9aa6c63fcbd 100644 --- a/app/services/update_status_service.rb +++ b/app/services/update_status_service.rb @@ -111,7 +111,7 @@ class UpdateStatusService < BaseService end def update_immediate_attributes! - @status.text = @options[:text].presence || @options.delete(:spoiler_text) || '' if @options.key?(:text) + @status.text = @options[:text].presence || @options.delete(:spoiler_text) || '' if @options.key?(:text) && @status.quote.blank? @status.spoiler_text = @options[:spoiler_text] || '' if @options.key?(:spoiler_text) @status.sensitive = @options[:sensitive] || @options[:spoiler_text].present? if @options.key?(:sensitive) || @options.key?(:spoiler_text) @status.language = valid_locale_cascade(@options[:language], @status.language, @status.account.user&.preferred_posting_language, I18n.default_locale)