From 7b38cb88caa46a47eb7b18f2211ef768923568aa Mon Sep 17 00:00:00 2001
From: Claire <claire.github-309c@sitedethib.com>
Date: Tue, 20 Sep 2022 23:49:00 +0200
Subject: [PATCH] Fix ProcessMentionService swallowing unprocessed mentions to
 unconfirmed/unapproved users (#19191)

---
 app/services/process_mentions_service.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index 8c63b611d..c9c158af1 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -38,7 +38,7 @@ class ProcessMentionsService < BaseService
       mentioned_account = Account.find_remote(username, domain)
 
       # Unapproved and unconfirmed accounts should not be mentionable
-      next if mentioned_account&.local? && !(mentioned_account.user_confirmed? && mentioned_account.user_approved?)
+      next match if mentioned_account&.local? && !(mentioned_account.user_confirmed? && mentioned_account.user_approved?)
 
       # If the account cannot be found or isn't the right protocol,
       # first try to resolve it