From 51bd3337efdf0a0dd33090357887a0722dde1335 Mon Sep 17 00:00:00 2001 From: comadreja Date: Mon, 15 Jun 2026 10:19:12 -0500 Subject: [PATCH] feat(bridge): send read receipts (blue ticks) for incoming messages Mark each incoming WhatsApp message as read via sock.readMessages() right after the startup-timestamp filter. Wrapped in try/catch so a failed receipt never blocks message processing. --- bridge/src/whatsapp.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bridge/src/whatsapp.ts b/bridge/src/whatsapp.ts index 1b4fb3b9..eddfd912 100644 --- a/bridge/src/whatsapp.ts +++ b/bridge/src/whatsapp.ts @@ -181,6 +181,14 @@ export class WhatsAppClient { const msgTimestamp = msg.messageTimestamp as number; if (msgTimestamp && msgTimestamp < startupTimestamp) continue; + // Send read receipt (blue check) immediately + try { + await this.sock!.readMessages([msg.key]); + } catch (e) { + // Non-fatal: log but don't block message processing + console.error('Failed to send read receipt:', (e as Error).message); + } + const unwrapped = baileysExtractMessageContent(msg.message); if (!unwrapped) continue;