2
0

🔥 Remove useless check for group id before saving …

This commit is contained in:
Baptiste Arnaud
2024-05-24 10:15:01 +02:00
parent 3320e1b809
commit b5d0ea422b

View File

@ -341,10 +341,6 @@ const saveAnswerInDb =
(state: SessionState, block: InputBlock) =>
async (reply: string): Promise<SessionState> => {
let newSessionState = state
const groupId = state.typebotsQueue[0].typebot.groups.find((group) =>
group.blocks.some((blockInGroup) => blockInGroup.id === block.id)
)?.id
if (!groupId) throw new Error('saveAnswer: Group not found')
await saveAnswer({
answer: {
blockId: block.id,