about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-10-20 19:14:46 +0200
committerThibG <thib@sitedethib.com>2018-10-21 16:09:18 +0200
commit4739e0f090a04235669ef81fa432ae90bb62f4c4 (patch)
tree5323ba964b333f343ec41abe78296c30dd2fa39d /app/services
parent8729f5e4665cf95b18c167f51562c38cf15db071 (diff)
Put a video camera emoji or a picture frame emoji instead of “.”
This uses the same logic as the status icons in the glitch flavor.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/post_status_service.rb5
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,