This commit is contained in:
Shaurya Agarwal 2026-08-14 09:32:02 -04:00 committed by GitHub
commit cb57b200fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -121,7 +121,8 @@ import {
assert.deepEqual(event.readReceiptKey, {
id: 'incoming-1',
remoteJid: '15551234567@s.whatsapp.net',
participant: '15550001111@s.whatsapp.net',
// (patch 004) DM keys must NOT carry participant — WhatsApp ignores
// group-shaped receipts on DMs. Groups still include it (test below).
fromMe: false,
});
assert.equal(event.hasQuotedMessage, true);

View File

@ -486,7 +486,11 @@ export async function extractBridgeEvent({
readReceiptKey: {
remoteJid: msg.key.remoteJid || chatId,
id: msg.key.id,
participant: msg.key.participant || senderId,
// (patch 004) participant only for group keys: WhatsApp silently
// ignores DM read receipts when a participant is present (the key
// looks group-shaped). Live-verified 2026-08-04: same DM key with
// participant -> no blue ticks; without -> ticks turn blue.
...(isGroup ? { participant: msg.key.participant || senderId } : {}),
fromMe: Boolean(msg.key.fromMe),
},
timestamp: msg.messageTimestamp,