fix: handle WhatsApp LID mentions (#692) (thanks @peschee)

This commit is contained in:
Peter Steinberger
2026-01-11 01:14:57 +01:00
parent 9984248f51
commit 6444258ad3
5 changed files with 198 additions and 20 deletions

View File

@@ -405,7 +405,7 @@ export function readWebSelfId(authDir: string = resolveDefaultWebAuthDir()) {
const raw = fsSync.readFileSync(credsPath, "utf-8");
const parsed = JSON.parse(raw) as { me?: { id?: string } } | undefined;
const jid = parsed?.me?.id ?? null;
const e164 = jid ? jidToE164(jid) : null;
const e164 = jid ? jidToE164(jid, { authDir }) : null;
return { e164, jid } as const;
} catch {
return { e164: null, jid: null } as const;