mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
fix: #9339, only log email errors once per digest, notification push
show notice in acp
This commit is contained in:
@@ -186,6 +186,7 @@ async function pushToUids(uids, notification) {
|
||||
}
|
||||
body = posts.relativeToAbsolute(body, posts.urlRegex);
|
||||
body = posts.relativeToAbsolute(body, posts.imgRegex);
|
||||
let errorLogged = false;
|
||||
await async.eachLimit(uids, 3, async (uid) => {
|
||||
await emailer.send('notification', uid, {
|
||||
path: notification.path,
|
||||
@@ -195,7 +196,12 @@ async function pushToUids(uids, notification) {
|
||||
body: body,
|
||||
notification: notification,
|
||||
showUnsubscribe: true,
|
||||
}).catch(err => winston.error(`[emailer.send] ${err.stack}`));
|
||||
}).catch((err) => {
|
||||
if (!errorLogged) {
|
||||
winston.error(`[emailer.send] ${err.stack}`);
|
||||
errorLogged = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user