fix: preserve whatsapp group JIDs

This commit is contained in:
Peter Steinberger
2025-12-23 03:05:59 +01:00
parent fc4a395c88
commit 4af08b1606
5 changed files with 30 additions and 4 deletions

View File

@@ -69,6 +69,18 @@ describe("normalizeE164 & toWhatsappJid", () => {
"5551234567@s.whatsapp.net",
);
});
it("preserves existing JIDs", () => {
expect(toWhatsappJid("123456789-987654321@g.us")).toBe(
"123456789-987654321@g.us",
);
expect(toWhatsappJid("whatsapp:123456789-987654321@g.us")).toBe(
"123456789-987654321@g.us",
);
expect(toWhatsappJid("1555123@s.whatsapp.net")).toBe(
"1555123@s.whatsapp.net",
);
});
});
describe("jidToE164", () => {