about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 89c2489b3..167bfd605 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -479,7 +479,10 @@ class User < ApplicationRecord
   end
 
   def user_might_not_be_a_spam_bot
-    username == account.username && (invited? || (invite_request&.text.present? && kobold_hash_matches?))
+    return false unless username.downcase == account.username.downcase
+
+    update(username: account.username) unless username == account.username
+    invited? || (invite_request&.text.present? && kobold_hash_matches?)
   end
 
   def kobold_hash_matches?