about summary refs log tree commit diff
path: root/app/services/process_mentions_service.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-07-24 11:26:40 +0200
committerThibaut Girka <thib@sitedethib.com>2020-07-24 11:26:40 +0200
commit4d950c71e9cc1e2b30292c0a572a70237560467d (patch)
tree7b7522ff688bdb0fa88a00d0c111e200d02bb51f /app/services/process_mentions_service.rb
parent16416e940fd803af92377eee9a1756ef27eed199 (diff)
parent956473142cf3e7e280d7d81990a4ade75095eb03 (diff)
Merge branch 'master' into glitch-soc/master
Diffstat (limited to 'app/services/process_mentions_service.rb')
-rw-r--r--app/services/process_mentions_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index 65a3f64b8..f45422970 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -36,7 +36,8 @@ class ProcessMentionsService < BaseService
 
       next match if mention_undeliverable?(mentioned_account) || mentioned_account&.suspended?
 
-      mentions << mentioned_account.mentions.where(status: status).first_or_create(status: status)
+      mention = mentioned_account.mentions.new(status: status)
+      mentions << mention if mention.save
 
       "@#{mentioned_account.acct}"
     end