viktor.mozharovskiy
NNovu
•Created by viktor.mozharovskiy on 7/11/2024 in #💬│support
@novu/headless: headlessService.fetchNotifications({onSuccess}) constantly receives latest state
Let me refine if we have an expected behaviour of
fetchNotifications
With code below we have onSuccess
invoked on every notifications update, it looks like socket used there, but there is no direct reference to it in the documentation.
You can also notice that we have this line of code listenNotificationReceiveChange(() => {})
- it's exactly the part that makes onSuccess
handler invoked (as headlessService?.fetchNotifications
option)
Is this a behaviour we can rely on or it's kind of a bug?
Is there any other way to get constant updates of the notifications with their latest state?
12 replies