fix(whatsapp): make inbound typing indicator non-blocking
This commit is contained in:
@@ -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 ?? '';
|
||||
|
||||
Reference in New Issue
Block a user