about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/services/process_mentions_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index 738bfa2d6..c38c89937 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -8,7 +8,7 @@ class ProcessMentionsService < BaseService
     return unless status.local? && !status.draft?
 
     @status  = status
-    mentions = []
+    mentions = Mention.where(status: status).to_a
 
     status.text = status.text.gsub(Account::MENTION_RE) do |match|
       username, domain  = Regexp.last_match(1).split('@')
@@ -32,7 +32,7 @@ class ProcessMentionsService < BaseService
     status.save!
 
     return if skip_notify
-    mentions.each { |mention| create_notification(mention) }
+    mentions.uniq.each { |mention| create_notification(mention) }
   end
 
   private