From 510c9049c79f4eb1e082932ff067fdb4216d1039 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 8 Mar 2018 08:20:49 +0100 Subject: For now, put a "." into no-text statuses with media for backcompat (#6691) --- app/services/post_status_service.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index df38d16a6..c91192181 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -22,6 +22,7 @@ class PostStatusService < BaseService media = validate_media!(options[:media_ids]) status = nil text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present? + text = '.' if text.blank? && !media.empty? ApplicationRecord.transaction do status = account.statuses.create!(text: text, -- cgit