For now, put a "." into no-text statuses with media for backcompat (#6691)
parent
49a14b022e
commit
0277ca9a0c
|
@ -22,6 +22,7 @@ class PostStatusService < BaseService
|
||||||
media = validate_media!(options[:media_ids])
|
media = validate_media!(options[:media_ids])
|
||||||
status = nil
|
status = nil
|
||||||
text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
|
text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
|
||||||
|
text = '.' if text.blank? && !media.empty?
|
||||||
|
|
||||||
ApplicationRecord.transaction do
|
ApplicationRecord.transaction do
|
||||||
status = account.statuses.create!(text: text,
|
status = account.statuses.create!(text: text,
|
||||||
|
|
Loading…
Reference in New Issue