about summary refs log tree commit diff
path: root/app/services/post_status_service.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-06 12:43:23 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commit6e8ec7f0a538b5383da49c4435835b78c61da0bc (patch)
tree92d6c4daefd18baf0e67cde3d44f25965871598b /app/services/post_status_service.rb
parent9f9ee606f32ccf1feb4f387f25a3f860e500f602 (diff)
Allow passing an array of tags to `PostStatusservice`
Diffstat (limited to 'app/services/post_status_service.rb')
-rw-r--r--app/services/post_status_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index 5b2b630d1..b8de35e2a 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -10,6 +10,7 @@ class PostStatusService < BaseService
   # @param [Hash] options
   # @option [String] :text Message
   # @option [Status] :thread Optional status to reply to
+  # @option [Tag] :tags Optional tags to include
   # @option [Boolean] :sensitive
   # @option [String] :visibility
   # @option [String] :sharekey
@@ -26,6 +27,7 @@ class PostStatusService < BaseService
     @options     = options
     @text        = @options[:text] || ''
     @in_reply_to = @options[:thread]
+    @tags        = @options[:tags]
 
     return idempotency_duplicate if idempotency_given? && idempotency_duplicate?
 
@@ -75,7 +77,7 @@ class PostStatusService < BaseService
       @status = @account.statuses.create!(status_attributes)
     end
 
-    process_hashtags_service.call(@status)
+    process_hashtags_service.call(@status, @tags)
     process_mentions_service.call(@status)
   end