diff options
-rw-r--r-- | app/services/post_status_service.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index ebb620ed9..d7d7770e9 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -21,7 +21,10 @@ class PostStatusService < BaseService media = validate_media!(options[:media_ids]) status = nil - text = '.' if text.blank? && options[:spoiler_text].present? + if text.blank? && options[:spoiler_text].present? + text = '.' + text = media.find(&:video?) ? '📹' : '🖼' if media.size > 0 + end ApplicationRecord.transaction do status = account.statuses.create!(text: text, |