diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-15 17:05:59 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-15 17:07:59 -0500 |
commit | f783ec279d03b7b56c96af5e18e0dd8c7a0710a1 (patch) | |
tree | 72ce17d7aef53c49d54a7482176a0b1864667302 /app/services | |
parent | f54329f9d6fa5d02944c60a87a3393023bfae9fd (diff) |
allow out-of-body mentions
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/process_mentions_service.rb | 4 |
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 |