fix (telegram/whatsapp): use account-scoped pairing allowlists

This commit is contained in:
Vignesh Natarajan
2026-02-15 19:09:07 -08:00
parent ee10feb80e
commit 6957354d48
6 changed files with 35 additions and 5 deletions

View File

@@ -88,7 +88,11 @@ async function resolveWhatsAppCommandAuthorized(params: {
return normalizeAllowFromE164(configuredGroupAllowFrom).includes(senderE164);
}
const storeAllowFrom = await readChannelAllowFromStore("whatsapp").catch(() => []);
const storeAllowFrom = await readChannelAllowFromStore(
"whatsapp",
process.env,
params.msg.accountId,
).catch(() => []);
const combinedAllowFrom = Array.from(
new Set([...(configuredAllowFrom ?? []), ...storeAllowFrom]),
);