🐛 (calCom) Don't delete session if chat reply has custom embed
Closes #1164
This commit is contained in:
@@ -16,6 +16,7 @@ type Props = {
|
||||
clientSideActions: ContinueChatResponse['clientSideActions']
|
||||
visitedEdges: VisitedEdge[]
|
||||
forceCreateSession?: boolean
|
||||
hasCustomEmbedBubble?: boolean
|
||||
}
|
||||
|
||||
export const saveStateToDatabase = async ({
|
||||
@@ -25,12 +26,15 @@ export const saveStateToDatabase = async ({
|
||||
clientSideActions,
|
||||
forceCreateSession,
|
||||
visitedEdges,
|
||||
hasCustomEmbedBubble,
|
||||
}: Props) => {
|
||||
const containsSetVariableClientSideAction = clientSideActions?.some(
|
||||
(action) => action.expectsDedicatedReply
|
||||
)
|
||||
|
||||
const isCompleted = Boolean(!input && !containsSetVariableClientSideAction)
|
||||
const isCompleted = Boolean(
|
||||
!input && !containsSetVariableClientSideAction && !hasCustomEmbedBubble
|
||||
)
|
||||
|
||||
const resultId = state.typebotsQueue[0].resultId
|
||||
|
||||
|
||||
Reference in New Issue
Block a user