From 280a91cfd55c66b996d651577689a138f00ed3e2 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Tue, 6 May 2025 16:28:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20Fix=20command=20event?= =?UTF-8?q?=20not=20triggering?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/bot-engine/src/events/executeCommandEvent.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/bot-engine/src/events/executeCommandEvent.ts b/packages/bot-engine/src/events/executeCommandEvent.ts index 6704c4cca..6c23afdb2 100644 --- a/packages/bot-engine/src/events/executeCommandEvent.ts +++ b/packages/bot-engine/src/events/executeCommandEvent.ts @@ -78,8 +78,9 @@ export const executeCommandEvent = ({ state, command }: Props) => { message: "Command event doesn't have a connected group", }); const nextBlockIndex = nextGroup.blocks.findIndex(byId(nextEdge.to.blockId)); + const newBlockId = `virtual-${event.id}-block`; newSessionState = addDummyFirstBlockToGroupIfMissing( - `virtual-${event.id}-block`, + newBlockId, newSessionState, { groupId: nextGroup.id, @@ -88,6 +89,6 @@ export const executeCommandEvent = ({ state, command }: Props) => { ); return { ...newSessionState, - currentBlockId: `virtual-${event.id}`, + currentBlockId: newBlockId, }; };