🐛 Add max wait block timeout on WhatsApp runtime
This commit is contained in:
@ -217,7 +217,10 @@ const executeClientSideAction =
|
||||
): Promise<{ replyToSend: string | undefined } | void> => {
|
||||
if ('wait' in clientSideAction) {
|
||||
await new Promise((resolve) =>
|
||||
setTimeout(resolve, clientSideAction.wait.secondsToWaitFor * 1000)
|
||||
setTimeout(
|
||||
resolve,
|
||||
Math.min(clientSideAction.wait.secondsToWaitFor, 10) * 1000
|
||||
)
|
||||
)
|
||||
if (!clientSideAction.expectsDedicatedReply) return
|
||||
return {
|
||||
|
Reference in New Issue
Block a user