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
When sending push notifications with overrides (e.g. setting the type to data) to a subscriber with multiple FCM device tokens, only the first registered device will receive the notification with the correct overrides. The first device token might not even be valid anymore, so the notification with the correct overrides might not have been received at all.
Looking at the code it seems that the options object including the overrides is modified in-place, e.g.:
📜 Description
When sending push notifications with overrides (e.g. setting the type to
data
) to a subscriber with multiple FCM device tokens, only the first registered device will receive the notification with the correct overrides. The first device token might not even be valid anymore, so the notification with the correct overrides might not have been received at all.Looking at the code it seems that the options object including the overrides is modified in-place, e.g.:
novu/providers/fcm/src/lib/fcm.provider.ts
Line 66 in 947ab95
and this code gets called when iterating over the device tokens of the subscriber:
novu/apps/worker/src/app/workflow/usecases/send-message/send-message-push.usecase.ts
Line 165 in 947ab95
👟 Reproduction steps
👍 Expected behavior
All push notifications for a subscriber with multiple device tokens should be sent with all overrides provided.
Example notification with type
data
set via overrides (currently no message body due to #4639)👎 Actual Behavior with Screenshots
Example notification that should have been sent with type
data
set via overrides (expected no message body due to #4639)Novu version
Novu SaaS
npm version
No response
node version
No response
📃 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?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: