educative.io

How do we ensure followers of user A who are online who got the notification will not get it again once message queue pushes notification for offline users when they will come online?

How do we ensure followers of user A who are online who got the notification will not get it again once message queue pushes notification for offline users when they will come online?


Course: Educative: Interactive Courses for Software Developers
Lesson: Educative: Interactive Courses for Software Developers

@Shivang

@Saurav_Raj You can tag a boolean variable ‘hasRead’ with every notification object. If the user interacts with a certain notification hasRead becomes true for it. The next time the user logs in, only notification objects with hasRead as false are pushed to the user.

1 Like