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

Message notifications #59

Closed
vladosam opened this issue Jun 6, 2022 · 6 comments
Closed

Message notifications #59

vladosam opened this issue Jun 6, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@vladosam
Copy link

vladosam commented Jun 6, 2022

It would be great if we could get notifications when xmpp-web page is not active or browser is minimised.

@vladosam vladosam added the enhancement New feature or request label Jun 6, 2022
@nioc
Copy link
Owner

nioc commented Jun 6, 2022

I agree.
You mean something like this: https://developer.mozilla.org/en-US/docs/Web/API/notification?

@nioc nioc added this to the 0.9.4 milestone Jun 6, 2022
@nioc
Copy link
Owner

nioc commented Jun 6, 2022

What I think for it:

  • ask permission on main page (after login),
  • notify user when he receives a message (chat and groupchat ?) and the app (page) is not currently displayed.

I do not know if you can catch that the browser is minimized?

This works wells with #57 for which I will add a timer for inactivity. But may be it is not a good idea to use the same mechanisms as some users may want to deactivated chat state... 🤔

@vladosam
Copy link
Author

vladosam commented Jun 6, 2022

What I think for it:

  • ask permission on main page (after login),
  • notify user when he receives a message (chat and groupchat ?) and the app (page) is not currently displayed.

I do not know if you can catch that the browser is minimized?

This works wells with #57 for which I will add a timer for inactivity. But may be it is not a good idea to use the same mechanisms as some users may want to deactivated chat state... 🤔

Yes, some pop-up notifications for missed messages with missed message counter on tab. Maybe with sound?

@nioc
Copy link
Owner

nioc commented Jun 6, 2022

That sounds good: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API

OK for counter on title.

@nioc
Copy link
Owner

nioc commented Jun 6, 2022

It is existing in VueUse:

@nioc nioc self-assigned this Jun 7, 2022
@nioc nioc modified the milestones: 0.10.0, 0.9.9 Feb 4, 2023
@nioc
Copy link
Owner

nioc commented Feb 4, 2023

I propose the following:

  • add a switch for user requesting notifications (on the presence drop down),
  • when a message is received, if the app is not visible, browser display a notification

@nioc nioc closed this as completed in 55e4900 Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants