fix(bot): enviar texto via WhatsAppSender antes de retornar PDF encadenado
El return de sendText() se descartaba; ahora se llama WhatsAppSender::sendText() directamente para que el texto llegue antes del PDF/Excel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
bd8544fce4
commit
2d98a9e7e0
@@ -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'] ?? '',
|
||||
|
||||
Reference in New Issue
Block a user