fix: send available presence on connect so typing indicators work consistently

Without announcing 'available' after connecting, WhatsApp stops relaying
composing/paused presence updates after the first message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-02-13 22:53:03 +02:00
parent 1549ad503e
commit 658f6b02d3

View File

@@ -103,6 +103,9 @@ export class WhatsAppChannel implements Channel {
this.connected = true;
logger.info('Connected to WhatsApp');
// Announce availability so WhatsApp relays subsequent presence updates (typing indicators)
this.sock.sendPresenceUpdate('available').catch(() => {});
// Build LID to phone mapping from auth state for self-chat translation
if (this.sock.user) {
const phoneUser = this.sock.user.id.split(':')[0];