Fix not being able to edit quote post text (#39837)

This commit is contained in:
Claire
2026-07-16 14:47:44 +02:00
parent ac385af2f4
commit d7bb36a64a
2 changed files with 35 additions and 1 deletions
+4 -1
View File
@@ -111,7 +111,10 @@ class UpdateStatusService < BaseService
end
def update_immediate_attributes!
@status.text = @options[:text].presence || @options.delete(:spoiler_text) || '' if @options.key?(:text) && @status.quote.blank?
if @options.key?(:text)
@status.text = @options[:text].presence || ''
@status.text = @options.delete(:spoiler_text) || '' if @status.text.blank? && @status.quote.blank?
end
@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)