1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-28 06:48:28 +09:00

Fix an error with 'multiple mentions with same username' (#16038)

This commit is contained in:
Takeshi Umeda 2021-04-14 22:48:49 +09:00 committed by GitHub
parent e78d06eecf
commit c968d22ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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