NovuN
Novuβ€’7mo ago
Luiz Carvalho

Novu Headless Socket

Hey everyone! πŸ‘‹

I'm using the Novu headless client and currently subscribing to:

novu.on("notifications.notification_received", (data) => {
  console.log("new notification =>", data);
});

novu.on("notifications.unread_count_changed", (data) => {
  console.log("new unread notifications count =>", data);
});


However, I'd like to subscribe directly to the lower-level WebSocket event for notification_received.

The reason is that the payload I send via the API includes some additional fields that don't seem to be exposed by the notifications.notification_received event.

Is there a more elegant or recommended way to listen directly to the raw WebSocket payload, so I can access these extra fields?

Or should I extend the client and manually handle the WebSocket connection myself?

Thanks for any guidance! πŸ™
Was this page helpful?