diff --git a/apps/docs/openapi/builder.json b/apps/docs/openapi/builder.json index 3243c12e4..a8c2bacef 100644 --- a/apps/docs/openapi/builder.json +++ b/apps/docs/openapi/builder.json @@ -7837,6 +7837,10 @@ "type": "string", "nullable": true }, + "folderId": { + "type": "string", + "nullable": true + }, "resultsTablePreferences": { "type": "object", "nullable": true, @@ -7880,7 +7884,8 @@ "variables", "theme", "settings", - "icon" + "icon", + "folderId" ], "title": "Typebot V6" }, @@ -10451,6 +10456,10 @@ "type": "string", "nullable": true }, + "folderId": { + "type": "string", + "nullable": true + }, "resultsTablePreferences": { "type": "object", "nullable": true, @@ -10494,7 +10503,8 @@ "variables", "theme", "settings", - "icon" + "icon", + "folderId" ], "title": "Typebot V5" } @@ -15348,7 +15358,7 @@ }, "folderName": { "type": "string", - "default": "New folder" + "default": "" }, "parentFolderId": { "type": "string" diff --git a/packages/bot-engine/whatsapp/resumeWhatsAppFlow.ts b/packages/bot-engine/whatsapp/resumeWhatsAppFlow.ts index 69f61da56..768efe541 100644 --- a/packages/bot-engine/whatsapp/resumeWhatsAppFlow.ts +++ b/packages/bot-engine/whatsapp/resumeWhatsAppFlow.ts @@ -41,12 +41,8 @@ export const resumeWhatsAppFlow = async ({ } } - const session = await getSession(sessionId) - const isPreview = workspaceId === undefined || credentialsId === undefined - const { typebot } = session?.state.typebotsQueue[0] ?? {} - const credentials = await getCredentials({ credentialsId, isPreview }) if (!credentials) { @@ -65,11 +61,12 @@ export const resumeWhatsAppFlow = async ({ const reply = await getIncomingMessageContent({ message: receivedMessage, - typebotId: typebot?.id, workspaceId, accessToken: credentials?.systemUserAccessToken, }) + const session = await getSession(sessionId) + const isSessionExpired = session && isDefined(session.state.expiryTimeout) && @@ -140,12 +137,10 @@ export const resumeWhatsAppFlow = async ({ const getIncomingMessageContent = async ({ message, - typebotId, workspaceId, accessToken, }: { message: WhatsAppIncomingMessage - typebotId?: string workspaceId?: string accessToken: string }): Promise => { @@ -161,7 +156,6 @@ const getIncomingMessageContent = async ({ case 'audio': case 'video': case 'image': - if (!typebotId) return let mediaId: string | undefined if (message.type === 'video') mediaId = message.video.id if (message.type === 'image') mediaId = message.image.id