about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-19 15:43:29 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-19 15:43:29 -0600
commit5c60f230cba68b46a93a6316a265838bd62f7c0f (patch)
tree9e8e3961aa13ecd925f5f0b3c99715449b7bb180 /app/services
parent8f7c3a0b118dcd99fecfdf70e6d4a48802462d9a (diff)
move bangtag processing responsibility to `PostStatusService`
Diffstat (limited to 'app/services')
-rw-r--r--app/services/post_status_service.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index 3e0dde72c..696a333f1 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -232,6 +232,8 @@ class PostStatusService < BaseService
       @status = @account.statuses.create!(status_attributes)
     end
 
+    process_bangtags
+
     return false if @status.destroyed?
 
     @hidden = @status.keep_hidden? if @hidden.blank?
@@ -276,6 +278,10 @@ class PostStatusService < BaseService
     raise Mastodon::ValidationError, I18n.t('media_attachments.validations.images_and_video') if @media.size > 1 && @media.find(&:video?)
   end
 
+  def process_bangtags
+    Bangtags.new(@status).process
+  end
+
   def process_mentions
     if @options[:mentions].present?
       @options[:mentions].each do |mentioned_account|