diff --git a/app/Services/TelegramBotService.php b/app/Services/TelegramBotService.php index 9d8e0a0..9b104db 100644 --- a/app/Services/TelegramBotService.php +++ b/app/Services/TelegramBotService.php @@ -206,12 +206,14 @@ class TelegramBotService private function processEmail(string $chatId, string $email, string $nombre): void { + $email = strtolower(trim($email)); + if (! filter_var($email, FILTER_VALIDATE_EMAIL)) { $this->send($chatId, "❌ Eso no parece un correo válido. Escríbelo de nuevo:"); return; } - $user = User::where('email', $email)->first(); + $user = User::whereRaw('LOWER(email) = ?', [$email])->first(); if (! $user) { $this->setState($chatId, [