novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.71k stars 3.56k forks source link

[NV-2129] 🐛 Bug Report: Notification Center issues (updating different pushes) #3211

Open ebimohi opened 1 year ago

ebimohi commented 1 year ago

📜 Description

I think the Notification Center should update instantly for all changes as it should push the the latest state for the feeds state. It should be pushed whenever any feed is added/removed or updated no matter it is an unseen or seen feed. But it seems that it works fine just for unseen feeds, but other feeds are not reflected. I have attached a screencast that reflects a user on two different browsers, we can assume that it can be two different devices that a user can of course have. Please see the screencast in attachment.

I'm not sure about the logic for this section in code, but I think at least there should be a hook or trigger initiated and pushed and the user agent can be notified to update the feed state.

or maybe there is already a hook that we can watch in the frontend app.

👟 Reproduction steps

please see the following screencast in discord link: https://discord.com/channels/895029566685462578/1097185860069367850

👍 Expected behavior

it should behave the same as for unseen feeds, or at least the better is it should be a trigger to change-to-feeds that can be pushed to the user agent and we can then make a fetch to get the latest feed

👎 Actual Behavior with Screenshots

please see the following screencast in discord link: https://discord.com/channels/895029566685462578/1097185860069367850

📃 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

NV-2129

scopsy commented 1 year ago

You are totally correct @ebimohi, this makes a lot of sense. I think we can utilize the existing "unseen/read_count_change" webhook event like we do when creating a new notification, also when the markAs endpoint is triggered. Wdyt?

ebimohi commented 1 year ago

@scopsy yeah, to add what you've mentioned I think that we need to trigger web-hook event for deleting feed as well. no matter if that is new or old, it should always trigger that web-hook (for feeds if we have any web-hook for it). Thanks!

gitstart commented 1 year ago

@scopsy I would like to pick this up