🔊 Add even more debug logs 🤔
This commit is contained in:
@@ -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' }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user