mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-25 21:01:54 +08:00
🐛 Fix embed bubble wait for event not working in linked bot
Closes #2237
This commit is contained in:
parent
b6dd05199a
commit
97d050cc99
@ -119,7 +119,7 @@ export const walkFlowForward = async (
|
||||
} while (
|
||||
nextEdge ||
|
||||
(!input &&
|
||||
!clientSideActions.some((ca) => ca.expectsDedicatedReply) &&
|
||||
!isDedicatedReplyNeeded({ clientSideActions, messages }) &&
|
||||
(newSessionState.typebotsQueue[0].queuedEdgeIds?.length ||
|
||||
newSessionState.typebotsQueue.length > 1))
|
||||
);
|
||||
@ -135,6 +135,17 @@ export const walkFlowForward = async (
|
||||
};
|
||||
};
|
||||
|
||||
const isDedicatedReplyNeeded = ({
|
||||
clientSideActions,
|
||||
messages,
|
||||
}: {
|
||||
clientSideActions: ContinueChatResponse["clientSideActions"];
|
||||
messages: ContinueChatResponse["messages"];
|
||||
}) =>
|
||||
// Either a client side action expects a dedicated reply or the last message is an embed which means it waits for an event
|
||||
clientSideActions?.some((ca) => ca.expectsDedicatedReply) ||
|
||||
messages.at(-1)?.type === BubbleBlockType.EMBED;
|
||||
|
||||
type ContextProps = {
|
||||
version: 1 | 2;
|
||||
state: SessionState;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user