about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-10-31 18:26:51 -0500
committerFire Demon <firedemon@creature.cafe>2020-10-31 18:26:51 -0500
commitb9aea0e52a3980844c7febad7aa973118811f178 (patch)
treef5d50d69737b38179bc8e4ea232d189afb55b265 /app
parent9ff2521be0e5e33d41f3799f9c3954b961180e53 (diff)
Ignore case of username confirmation
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?