diff --git a/services/NormalBot.php b/services/NormalBot.php index 67f8e39..6f70044 100644 --- a/services/NormalBot.php +++ b/services/NormalBot.php @@ -1277,8 +1277,9 @@ class NormalBot $msg = $json['mensaje'] ?? ($json['message'] ?? 'No hay datos disponibles para el perĂ­odo solicitado.'); $nextKey = $params['next_endpoint_key'] ?? ''; if ($nextKey !== '' && ($json['status'] ?? '0') === '1') { - // Enviar texto primero, luego solicitar el reporte complementario (PDF/Excel) - self::sendText($msg, $context['from'], $company); + // Enviar texto primero directamente, luego retornar el PDF/Excel + $phoneId = $context['phone_number_id'] ?? ($company['phone_number_id'] ?? ''); + WhatsAppSender::sendText($context['from'], $msg, $phoneId); $nextParams = array_merge($params, [ 'endpoint_key' => $nextKey, 'caption' => $params['next_caption'] ?? '',