GetStream / react-activity-feed

Stream React Activity Feed Components
https://getstream.io/react-activity-feed/
BSD 3-Clause "New" or "Revised" License
137 stars 83 forks source link

bug: getting same entry of the same activity for multiple times if a user has opened multiple tabs #368

Open krupesh-j opened 2 years ago

krupesh-j commented 2 years ago

We have the functionality to show notifications to users, and for that, we use the getstream.io service and react-activity-feed package. When a user subscribes to the StramApp & NotificationDropdown component we get that response through getstream's API (GET method).

The issue here we are facing - If a user has opened two or multiple tabs, and subscribes to the StreamApp & NotificationDropdown component on each tab then we are getting multiple entries of the same activity.

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior: Create your application with react-activity-feed, keep multiple tabs open at the same time, subscribe or visit each tab one by one (not necessary), and see the API response that you get from activities.

Expected behavior

Even if multiple tabs are open then we should not get multiple instances of the same activity.

Desktop: