Skip to content

Commit

Permalink
fix: fixed MX tests
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Sep 4, 2024
1 parent ee7fc58 commit 48b1dd3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions helpers/on-data-mx.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ const scanner = new SpamScanner({
async function imap(aliases) {
console.log('aliases', aliases);
// TODO: finish this
return [];
}

async function forward(recipient) {
console.log('recipient', recipient);
// TODO: finish this
return [];
}

//
Expand Down Expand Up @@ -296,10 +298,10 @@ async function onDataMX(raw, session, headers, body) {
// deliver to IMAP and forward messages in parallel
const [imapBounces, forwardBounces] = await Promise.all([
// imap
data.imap.length === 0 ? Promise.resolve() : imap(data.imap),
data.imap.length === 0 ? Promise.resolve([]) : imap(data.imap),
// forwarding
data.normalized.length === 0
? Promise.resolve()
? Promise.resolve([])
: pMap(data.normalized, (recipient) => forward(recipient), {
concurrency: config.concurrency
})
Expand Down

0 comments on commit 48b1dd3

Please sign in to comment.