Skip to content

Commit

Permalink
trying to fix transcription chat bot
Browse files Browse the repository at this point in the history
  • Loading branch information
AnshulNewron committed Apr 16, 2024
1 parent fe844db commit 7803959
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions packages/app/src/helpers/node/webhookHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,28 +253,28 @@ export async function handleQuestionResponses(messageId: any, session: any, waID
return;
}

if (messageId.wfID === 3) {
const responseKeys = Object.keys(response);
responseKeys.forEach(key => {
if (response[key] === "null") {
response[key] = "NA"
}
});

const upddatedSession = await db.user_session.update({
where: {
id: session.id,
},
data: {
responses: response
}
});

await updateTask(waID, upddatedSession);
await handleWFResponse({ type: "WF", wfID: 3 }, upddatedSession, waID);

return;
}
// if (messageId.wfID === 3) {
// const responseKeys = Object.keys(response);
// responseKeys.forEach(key => {
// if (response[key] === "null") {
// response[key] = "NA"
// }
// });

// const upddatedSession = await db.user_session.update({
// where: {
// id: session.id,
// },
// data: {
// responses: response
// }
// });

// await updateTask(waID, upddatedSession);
// await handleWFResponse({ type: "WF", wfID: 3 }, upddatedSession, waID);

// return;
// }

const updatedSesssion = await updateSession(response, session.id, filteredQuestions[0].uuid);

Expand Down

0 comments on commit 7803959

Please sign in to comment.