mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 00:58:18 +00:00
Only check locally when deduplicating usernames (#13581)
When deduplicating account usernames for OAuthable users, the routine did check if any account was known with that username, including remote accounts. This caused some unnecessary deduplication, and usernames ending with unexpected trailing _1. This fixes #13580
This commit is contained in:
parent
b8ba977497
commit
3511528e50
|
@ -82,7 +82,7 @@ module Omniauthable
|
|||
username = starting_username
|
||||
i = 0
|
||||
|
||||
while Account.exists?(username: username)
|
||||
while Account.exists?(username: username, domain: nil)
|
||||
i += 1
|
||||
username = "#{starting_username}_#{i}"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue