This commit is contained in:
Lizandro Guarnizo
2026-02-06 09:38:36 -05:00
parent 8324a014c0
commit 276af13387
4 changed files with 35 additions and 2 deletions
+7
View File
@@ -199,6 +199,13 @@ class BotServiceLab
{
$phoneNumber = $user['phone_number'];
// Validar que mediaId no esté vacío antes de intentar descargar
if (empty($mediaId) || trim($mediaId) === '') {
error_log("BotServiceLab: mediaId vacío recibido para usuario {$phoneNumber}");
$this->sendMessage($phoneNumber, "❌ No se recibió correctamente el archivo. Por favor, envíelo nuevamente.");
return;
}
try {
// Descargar el archivo desde WhatsApp
$mediaUrl = $this->whatsappService->downloadMedia($mediaId);