From 90771eb34a48f9ea1d188d5effe7932c4dbfb6a1 Mon Sep 17 00:00:00 2001 From: brobert Date: Sun, 12 Oct 2025 21:49:02 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20usar=20d=C3=ADgitos=20del=20jid=20como?= =?UTF-8?q?=20fallback=20al=20normalizar=20WhatsApp=20ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aider (openrouter/openai/gpt-5) --- src/services/group-sync.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/services/group-sync.ts b/src/services/group-sync.ts index 1ce6b54..4342349 100644 --- a/src/services/group-sync.ts +++ b/src/services/group-sync.ts @@ -439,7 +439,11 @@ export class GroupSyncService { } } - const norm = normalizeWhatsAppId(jid); + let norm = normalizeWhatsAppId(jid); + if (!norm) { + const digits = (jid || '').replace(/\D+/g, ''); + norm = digits || null; + } if (!norm) continue; result.push({ userId: norm, isAdmin }); } @@ -528,7 +532,11 @@ export class GroupSyncService { } } - const norm = normalizeWhatsAppId(jid); + let norm = normalizeWhatsAppId(jid); + if (!norm) { + const digits = (jid || '').replace(/\D+/g, ''); + norm = digits || null; + } if (!norm) continue; result.push({ userId: norm, isAdmin }); }