main
borja 3 months ago
parent 233f27aa59
commit 4daca04352

Binary file not shown.

@ -16,10 +16,11 @@ export async function sendMessage(phone: string, message: string | {text: string
try { try {
// Normalize message input to always have text property // Normalize message input to always have text property
const messageText = typeof message === 'string' ? message : message.text; const messageText = typeof message === 'string' ? message : message.text;
console.log(`el phone es ${phone} y el mensaje es ${message}`)
// Build payload according to API specification // Build payload according to API specification
const payload = { const payload = {
number: phone, number: phone,
text: messageText,
textMessage: { textMessage: {
text: messageText text: messageText
}, },

Loading…
Cancel
Save