🔊 more
This commit is contained in:
@ -87,7 +87,11 @@ const processWhatsAppReply = async ({
|
|||||||
.metadata.phone_number_id
|
.metadata.phone_number_id
|
||||||
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}`,
|
||||||
|
new Date().toISOString()
|
||||||
|
)
|
||||||
try {
|
try {
|
||||||
const { message } = await resumeWhatsAppFlow({
|
const { message } = await resumeWhatsAppFlow({
|
||||||
receivedMessage,
|
receivedMessage,
|
||||||
|
@ -10,9 +10,9 @@ import { getSession } from '../queries/getSession'
|
|||||||
import { continueBotFlow } from '../continueBotFlow'
|
import { continueBotFlow } from '../continueBotFlow'
|
||||||
import { decrypt } from '@typebot.io/lib/api/encryption/decrypt'
|
import { decrypt } from '@typebot.io/lib/api/encryption/decrypt'
|
||||||
import { saveStateToDatabase } from '../saveStateToDatabase'
|
import { saveStateToDatabase } from '../saveStateToDatabase'
|
||||||
import prisma from '@typebot.io/lib/prisma'
|
|
||||||
import { isDefined } from '@typebot.io/lib/utils'
|
import { isDefined } from '@typebot.io/lib/utils'
|
||||||
import { Reply } from '../types'
|
import { Reply } from '../types'
|
||||||
|
import { PrismaClient } from '@typebot.io/prisma'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
receivedMessage: WhatsAppIncomingMessage
|
receivedMessage: WhatsAppIncomingMessage
|
||||||
@ -199,7 +199,9 @@ const getCredentials = async ({
|
|||||||
|
|
||||||
if (!credentialsId) return
|
if (!credentialsId) return
|
||||||
|
|
||||||
console.log('prisma go')
|
console.log('prisma client')
|
||||||
|
const prisma = new PrismaClient()
|
||||||
|
console.log('prisma go', new Date().toISOString())
|
||||||
const credentials = await prisma.credentials.findUnique({
|
const credentials = await prisma.credentials.findUnique({
|
||||||
where: {
|
where: {
|
||||||
id: credentialsId,
|
id: credentialsId,
|
||||||
|
Reference in New Issue
Block a user