You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a subscriber (ID: 66e0d1f3cf609b1343ed9e8e) and a workflow (ID: 66ecdd18a17d00ef6f792cab) configured to send email and push notifications. I've explicitly set the subscriber's email and push channel preferences to false using the code below.
However, when I trigger workflow 66ecdd18a17d00ef6f792cab for this subscriber, I still receive both email and push notifications, contrary to my expectation.
code to trigger the workflow
async function sendEmail() {
await novu.trigger("WORKFLOW_NAME", { // WORKFLOW_NAME is the name for template id 66ecdd18a17d00ef6f792cab
to: {
subscriberId: "66e0d1f3cf609b1343ed9e8e",
email: "[email protected]", // fake email for reporting issue purpose
},
payload: {
// Any custom payload data goes here
data: {
emailData: {subject: 'subject', body: 'body'},
pushData: {
subject: "Push notification subject",
body: "Push notification body",
},
},
},
bridgeUrl: "https://xxxxxx-c8dd-465c-b066-1184b307c8bd.novu.sh/api/novu",
});
👟 Reproduction steps
invoke subscriber updatePreferences api to set email and push channel to false for subscriber for a workflow.
invoke novu.trigger function to trigger the above workflow and subscriber;
👍 Expected behavior
Since the subscriber's preferences indicate they should not receive email and push notifications, triggering the workflow should not result in any notifications being sent to them.
👎 Actual Behavior with Screenshots
When I trigger workflow 66ecdd18a17d00ef6f792cab for this subscriber, I still receive both email and push notifications, contrary to my expectation.
Novu version
local installation @novu/node version 2.0.1
npm version
10.7.0
node version
v18.20.4
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
I see workflow with id 66ecdd18a17d00ef6f792cab is deleted already. Can you please send us email to [email protected] if you are still facing this issue?
@jainpawan21 sorry for late response. i still have the the issue as of 29/10/2024; My feeling is that, the function novu.subscribers.updatePreference is not working properly, it seems not updating subscribers' preferences; In my case, even I changed the PUSH channel preferences to disabled, still i can send push notifications;
📜 Description
I have a subscriber (ID: 66e0d1f3cf609b1343ed9e8e) and a workflow (ID: 66ecdd18a17d00ef6f792cab) configured to send email and push notifications. I've explicitly set the subscriber's email and push channel preferences to false using the code below.
However, when I trigger workflow 66ecdd18a17d00ef6f792cab for this subscriber, I still receive both email and push notifications, contrary to my expectation.
👟 Reproduction steps
👍 Expected behavior
Since the subscriber's preferences indicate they should not receive email and push notifications, triggering the workflow should not result in any notifications being sent to them.
👎 Actual Behavior with Screenshots
When I trigger workflow 66ecdd18a17d00ef6f792cab for this subscriber, I still receive both email and push notifications, contrary to my expectation.
Novu version
local installation @novu/node version 2.0.1
npm version
10.7.0
node version
v18.20.4
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: