Tests: cover agents and fix web defaults

Co-authored-by: RealSid08 <RealSid08@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2025-12-02 10:56:10 +00:00
parent f31e89d5af
commit ed080ae988
17 changed files with 285 additions and 82 deletions

View File

@@ -103,8 +103,13 @@ export async function monitorWebInbox(options: {
const isSamePhone = from === selfE164;
if (!isSamePhone && Array.isArray(allowFrom) && allowFrom.length > 0) {
if (!allowFrom.includes("*") && !allowFrom.map(normalizeE164).includes(from)) {
logVerbose(`Blocked unauthorized sender ${from} (not in allowFrom list)`);
if (
!allowFrom.includes("*") &&
!allowFrom.map(normalizeE164).includes(from)
) {
logVerbose(
`Blocked unauthorized sender ${from} (not in allowFrom list)`,
);
continue; // Skip processing entirely
}
}