fix(whatsapp): make inbound typing indicator non-blocking

This commit is contained in:
William Valentin
2026-02-16 00:58:33 -08:00
parent ae36248da8
commit 7a298576e8
3 changed files with 15 additions and 11 deletions
+8 -5
View File
@@ -278,11 +278,14 @@ export class WhatsAppAdapter implements ChannelAdapter {
}
}
// Send typing indicator
try {
const chat = await message.getChat?.();
await chat?.sendStateTyping();
} catch { /* ignore typing errors */ }
// Send typing indicator without delaying message dispatch.
void Promise.resolve(message.getChat?.())
.then(async (chat) => {
await chat?.sendStateTyping();
})
.catch(() => {
// ignore typing errors
});
// Strip bot mention from message body for group messages
let text = message.body ?? '';