fix(whatsapp): populate senderE164 for direct chats to enable owner commands (#247)

This commit is contained in:
Xin
2026-01-05 23:54:35 +00:00
committed by GitHub
parent a4fdfc2414
commit a6a45f4b84

View File

@@ -144,10 +144,14 @@ export async function monitorWebInbox(options: {
continue;
const group = isJidGroup(remoteJid);
const participantJid = msg.key?.participant ?? undefined;
const senderE164 = participantJid ? jidToE164(participantJid) : null;
const from = group ? remoteJid : jidToE164(remoteJid);
// Skip if we still can't resolve an id to key conversation
if (!from) continue;
const senderE164 = group
? participantJid
? jidToE164(participantJid)
: null
: from;
let groupSubject: string | undefined;
let groupParticipants: string[] | undefined;
if (group) {