@arasbm said:
There have been no active topics in the past day
I don't have an exact answer, but I can steer you in the right direction...
src/emailer.js
has this code in it:
Plugins.fireHook('action:email.send', {
to: results.email,
from: meta.config['email:from'] || '[email protected]',
subject: translated[2],
html: translated[0],
plaintext: translated[1],
template: template,
uid: uid
});
A hacky way might be to wrap that method in an if statement like this:
if (translated[1] !== "There have been no active topics in the past day") {
Plugins.fireHook('action:email.send', {
to: results.email,
from: meta.config['email:from'] || '[email protected]',
subject: translated[2],
html: translated[0],
plaintext: translated[1],
template: template,
uid: uid
});
}
THIS IS NOT AN EXACT ANSWER. I'm just throwing this out there to steer towards a solution. I have no idea what translated[1] would give you...
Using grep
helps with this type of stuff...for example from your nodebb root you can do:
grep -r "There have been no active topics in the past day"
It will search recursively through and spit out the file name and line of text wherever it finds the matched string...I use this a lot for tracing functionality through nodebb core. Really helpful if you are writing plugins and want to trace the hooks to their source...