@@ -11,6 +11,7 @@ import { restartSession } from '@typebot.io/bot-engine/queries/restartSession'
|
||||
import { continueBotFlow } from '@typebot.io/bot-engine/continueBotFlow'
|
||||
import { parseDynamicTheme } from '@typebot.io/bot-engine/parseDynamicTheme'
|
||||
import { isDefined } from '@typebot.io/lib/utils'
|
||||
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
|
||||
|
||||
export const sendMessageV1 = publicProcedure
|
||||
.meta({
|
||||
@@ -136,8 +137,11 @@ export const sendMessageV1 = publicProcedure
|
||||
logs: allLogs,
|
||||
clientSideActions,
|
||||
visitedEdges,
|
||||
hasCustomEmbedBubble: messages.some(
|
||||
(message) => message.type === 'custom-embed'
|
||||
hasEmbedBubbleWithWaitEvent: messages.some(
|
||||
(message) =>
|
||||
message.type === 'custom-embed' ||
|
||||
(message.type === BubbleBlockType.EMBED &&
|
||||
message.content.waitForEvent?.isEnabled)
|
||||
),
|
||||
setVariableHistory,
|
||||
})
|
||||
@@ -199,8 +203,11 @@ export const sendMessageV1 = publicProcedure
|
||||
logs: allLogs,
|
||||
clientSideActions,
|
||||
visitedEdges,
|
||||
hasCustomEmbedBubble: messages.some(
|
||||
(message) => message.type === 'custom-embed'
|
||||
hasEmbedBubbleWithWaitEvent: messages.some(
|
||||
(message) =>
|
||||
message.type === 'custom-embed' ||
|
||||
(message.type === BubbleBlockType.EMBED &&
|
||||
message.content.waitForEvent?.isEnabled)
|
||||
),
|
||||
setVariableHistory,
|
||||
})
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
chatReplySchema,
|
||||
sendMessageInputSchema,
|
||||
} from '@typebot.io/schemas/features/chat/legacy/schema'
|
||||
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
|
||||
|
||||
export const sendMessageV2 = publicProcedure
|
||||
.meta({
|
||||
@@ -136,8 +137,11 @@ export const sendMessageV2 = publicProcedure
|
||||
logs: allLogs,
|
||||
clientSideActions,
|
||||
visitedEdges,
|
||||
hasCustomEmbedBubble: messages.some(
|
||||
(message) => message.type === 'custom-embed'
|
||||
hasEmbedBubbleWithWaitEvent: messages.some(
|
||||
(message) =>
|
||||
message.type === 'custom-embed' ||
|
||||
(message.type === BubbleBlockType.EMBED &&
|
||||
message.content.waitForEvent?.isEnabled)
|
||||
),
|
||||
setVariableHistory,
|
||||
})
|
||||
@@ -198,8 +202,11 @@ export const sendMessageV2 = publicProcedure
|
||||
logs: allLogs,
|
||||
clientSideActions,
|
||||
visitedEdges,
|
||||
hasCustomEmbedBubble: messages.some(
|
||||
(message) => message.type === 'custom-embed'
|
||||
hasEmbedBubbleWithWaitEvent: messages.some(
|
||||
(message) =>
|
||||
message.type === 'custom-embed' ||
|
||||
(message.type === BubbleBlockType.EMBED &&
|
||||
message.content.waitForEvent?.isEnabled)
|
||||
),
|
||||
setVariableHistory,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user