1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

For now, put a "." into no-text statuses with media for backcompat (#6691)

This commit is contained in:
Eugen Rochko 2018-03-08 08:20:49 +01:00 committed by GitHub
parent ed902581d3
commit 510c9049c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,