Skip to content

Commit

Permalink
🏴‍☠️ (crisp): add delay hack
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Sep 2, 2024
1 parent 09c16e5 commit 6fe3433
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/connectors/crisp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export async function startCripsConversation({
},
});

// HACK(douglasduteil): Wait for the message to be sent
// Crisp seems to have a delay between the message being sent and the state being updated
await new Promise((resolve) => setTimeout(resolve, 500));

await fetch_crisp<UpdateConversationStateRoute>(config, {
endpoint: `/v1/website/${config.website_id}/conversation/${session_id}/state`,
method: "PATCH",
Expand Down

0 comments on commit 6fe3433

Please sign in to comment.