Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additions to notification system #909

Open
AbhiAgarwal opened this issue Aug 10, 2017 · 3 comments
Open

Additions to notification system #909

AbhiAgarwal opened this issue Aug 10, 2017 · 3 comments

Comments

@AbhiAgarwal
Copy link
Member

Want a way to know when the user has read the notifications. This is so if you login to the site and not click the notifications on the top - they won't disappear. Right now they go away if you refresh the page (and don't check the notifications).

you can do a emit to:

var notificationDetails = {
    'notification': 'read'
};
socket.emit('notification', notificationDetails);

This will let the live server know that all the notifications have been read.

This new way will not delete pending notifications until you send an emit to notification. This can probably be done when they click the notifications icon on the top.

If they don't click the notifications icon at the top and refresh - they will still see the notification.

After you've emitted this. On all the other clients that are listening, you'll get a message:

{
    "type": "notification",
    "action": "read"
}

When this happens - you can clear the notification bar in all of them. This is so when you have 2 chrome browsers open & you open them in one - it should remove the "14 notifications" in the other one.

@AbhiAgarwal
Copy link
Member Author

let me know when u add this. I won't push the new change until you've written the code (since it an get annoying to have notifications just not be deleted)

@AbhiAgarwal
Copy link
Member Author

The next addition will be to give you some past notifications back so when the user clicks they can see some stuff from the past too

@juliepanda
Copy link

yea old notifications would be nice like a "Load More"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants