fix(web): let group pings bypass allowFrom

This commit is contained in:
Peter Steinberger
2025-12-03 13:11:01 +00:00
parent 47d0b6fc14
commit 3a782b6ace
3 changed files with 11 additions and 15 deletions

View File

@@ -116,9 +116,10 @@ export async function monitorWebInbox(options: {
const allowFrom = cfg.inbound?.allowFrom;
const isSamePhone = from === selfE164;
if (!isSamePhone && Array.isArray(allowFrom) && allowFrom.length > 0) {
const candidate =
group && senderE164 ? normalizeE164(senderE164) : from;
const allowlistEnabled =
!group && Array.isArray(allowFrom) && allowFrom.length > 0;
if (!isSamePhone && allowlistEnabled) {
const candidate = from;
const allowedList = allowFrom.map(normalizeE164);
if (!allowFrom.includes("*") && !allowedList.includes(candidate)) {
logVerbose(