2
0

🔊 Add even more debug logs 🤔

This commit is contained in:
Baptiste Arnaud
2024-04-17 10:52:27 +02:00
parent 62fde80f86
commit 40dfa8cc60

View File

@@ -88,17 +88,22 @@ const processWhatsAppReply = async ({
if (!phoneNumberId) return { message: 'No phone number id found' } if (!phoneNumberId) return { message: 'No phone number id found' }
console.log('Received message:', receivedMessage) console.log('Received message:', receivedMessage)
console.log('sessionId', `wa-${phoneNumberId}-${receivedMessage.from}`) console.log('sessionId', `wa-${phoneNumberId}-${receivedMessage.from}`)
const { message } = await resumeWhatsAppFlow({ try {
receivedMessage, const { message } = await resumeWhatsAppFlow({
sessionId: `wa-${phoneNumberId}-${receivedMessage.from}`, receivedMessage,
phoneNumberId, sessionId: `wa-${phoneNumberId}-${receivedMessage.from}`,
credentialsId, phoneNumberId,
workspaceId, credentialsId,
contact: { workspaceId,
name: contactName, contact: {
phoneNumber: contactPhoneNumber, name: contactName,
}, phoneNumber: contactPhoneNumber,
}) },
console.log('Message:', message) })
return { message } console.log('Message:', message)
return { message }
} catch (err) {
console.error('Error:', err)
return { message: 'Error processing message' }
}
} }