@julian Thanks for getting back to me quickly. Other priorities pulled me away from this, but after looking at your response, it seems like what I'm actually after are "unread" counts, not just notifications. The simple GET solution returned notifications, but not every "unread". Our app is using the session sharing plugin, and we are associating NodeBB accounts with our app accounts. Would I be able to leverage some of the session sharing functionality to get an unread count for users on our app based on their NodeBB account? Thanks
avoid nodebb send email notifications if daily digest is on
-
If a user has the digest email set to daily / weekly / monthly , still gets notification emails each time a new event fires.
I was wondering if there is a way to avoid email notifications to be sent if the digest is different to "off"
maybe using one of these hooks?
filter:email.prepare filter:email.cancel filter:email.params filter:email.modify filter:email.send
Thanks for the help.
-
A user can select how they get notifications on the user settings. You can set the default settings for new users in the admin panel.
-
@PitaJ Thanks for the reply, but I'm actually looking to change the behavior nodebb has by default.
So I want users that choose to get notifications through email digest not ro receive email notifications. The users that don't choose email digest will get email notifications as usual.
So I was wondering which is the right hook to to this filter.
-
@Sebastián-Cisneros said in avoid nodebb send email notifications if daily digest is on:
filter:email.prepare
filter:email.cancel
filter:email.params
filter:email.modify
filter:email.sendare any of these filters the right way to get this done?
-
I guess the right one is this one
filter:email.cancel
accodring to nodebb documents
const result = await Plugins.hooks.fire('filter:email.cancel', { cancel: false, // set to true in plugin to cancel sending email template: template, params: params, });
right?