mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 13:36:01 +01:00
Skipping digest sending if no notifs and no new topics, #2455
This commit is contained in:
@@ -84,6 +84,11 @@ module.exports = (function(Digest) {
|
||||
|
||||
notifications = notifications.filter(Boolean);
|
||||
|
||||
// If there are no notifications and no new topics, don't bother sending a digest
|
||||
if (!notifications.length && !data.topics.topics.length) {
|
||||
return next();
|
||||
}
|
||||
|
||||
for(var i=0; i<notifications.length; ++i) {
|
||||
if (notifications[i].image.indexOf('http') !== 0) {
|
||||
notifications[i].image = nconf.get('url') + notifications[i].image;
|
||||
|
||||
Reference in New Issue
Block a user