up
This commit is contained in:
@@ -155,10 +155,16 @@ try {
|
||||
error_log("=== DEBUG WHATSAPP TEXT MESSAGE ===");
|
||||
error_log("Recipient: " . $recipient);
|
||||
error_log("Message: " . $input['message']);
|
||||
error_log("Method: sendTextMessage()");
|
||||
error_log("Method: sendTextMessage()/sendTextReply()");
|
||||
error_log("====================================");
|
||||
|
||||
$response = $whatsappService->sendTextMessage($recipient, $input['message']);
|
||||
|
||||
// Si viene reply_to, usar reply con contexto
|
||||
if (!empty($input['reply_to'])) {
|
||||
$replyTo = $input['reply_to'];
|
||||
$response = $whatsappService->sendTextReply($recipient, $replyTo, $input['message']);
|
||||
} else {
|
||||
$response = $whatsappService->sendTextMessage($recipient, $input['message']);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'template':
|
||||
|
||||
Reference in New Issue
Block a user