From c968d22ee95fd9a37695b896cd86b7608689ead1 Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Wed, 14 Apr 2021 22:48:49 +0900 Subject: [PATCH] Fix an error with 'multiple mentions with same username' (#16038) --- app/lib/formatter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index f13b183ad2c..fd653752627 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -276,7 +276,7 @@ class Formatter linkable_accounts.each do |item| same_username = item.username.casecmp(username).zero? - same_domain = item.domain.nil? ? domain.nil? : item.domain.casecmp(domain).zero? + same_domain = item.domain.nil? ? domain.nil? : item.domain.casecmp(domain)&.zero? if same_username && !same_domain same_username_hits += 1