From 6e8ec7f0a538b5383da49c4435835b78c61da0bc Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 6 May 2019 12:43:23 -0500 Subject: [PATCH] Allow passing an array of tags to `PostStatusservice` --- app/services/post_status_service.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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