igniterealtime / pade

Pàdé (Yoruba word for Meet) is a browser extension (Chrome/Edge) based unified communications desktop client for Openfire.
https://igniterealtime.github.io/pade/
Apache License 2.0
104 stars 46 forks source link

Clear windows 10 notifications once messages are read directly in Pade #191

Closed rodrigolzd closed 5 years ago

rodrigolzd commented 5 years ago

Currently Pade notifications for unread messages stay in windows notification center for quite some time and windows keeps showing old messages causing confusion. If you read the message directly on Pade you may still have to clear them manually on windows.

Pade should somehow clear the messages notification that have been read by itself.

Please consider a solution. Thank you!

wrooot commented 5 years ago

Yes, that's inconvenient, but probably hard to solve as this is controlled by Chrome and then Windows Action Center. Pade would have somehow keep the list of already shown notifications and when window becomes active send some command to Windows Action Center to close such notifications. Not sure if there is such command. Or maybe not keep the list, but just close all current notifications. Although this way you might miss personally addressed messages, if you were gone for a while and the chat is very active.

deleolajide commented 5 years ago

Each notification does has an id (from JID) that can be used to close it from JavaScript, but there is no event that indicates that a message has been read. We would have to keep a list as suggested by @wroot and wait for a UI gesture like a mouse/keyboard or timer event to remove all notifications for all read messages in our list.

There is the risk or removing a notification before a users actually sees it and this reduces the value of the Chrome handing over notification management to the O/S. I think it might be best to put this behavior behind a user preference/option when implemented.

deleolajide commented 5 years ago

A simpler solution might be to provide a new user preference that controls if notifications should be sticky, requiring the user to dismiss them with a UI gesture (default) or they should use the auto-disappear after a timeout.

rodrigolzd commented 5 years ago

Just thinking out loud here. What if the notification sent to windows has a timeout and Pade itself if the message as read? If it's unread notification is sent again.

deleolajide commented 5 years ago

If you read the message directly on Pade you may still have to clear them manually on windows.

Just ran a test to confirm the premise of this issue is not exactly true. Notifications in Windows 10 which require user intervention like unread chat messages do expire and Windows 10 eventually moves them off screen into the action center panel.

Consequently, I think the solution is to configure Windows 10 to have a shorter expiry period for Notifications that require user intervention rather than any code changes

rodrigolzd commented 5 years ago

To me some of the problems with changing windows is that it's beyond the control of the software and honestly I never had this type of problem with any other software to justify changing the overall system configuration.

In my personal experience. I get notified for messages even after hours of having read the messages, so the timing seems arbitrary.

deleolajide commented 5 years ago

In my personal experience. I get notified for messages even after hours of having read the messages, so the timing seems arbitrary

That sound like a completely different issue. The notification got delayed. I think you should raise that as a different issue. I want to make a new Pade release tonight and this issue was holding me up, but I am going to close it as controlling the notification expiry behavior for web apps is an O/S issue and no more a browser issue.

I don't want to add any new complicated notification logic that will come back to haunt me. I prefer to have an annoying notification rather than to miss a very important one.

I never had this type of problem with any other software.

Have you fine tuned your Windows 10 notifications for Chrome?

image

rodrigolzd commented 5 years ago

I'll gladly be wrong about the issue if it comes to but I'll keep watching for it. I have never touched chrome notifications. Please pm me how you tested the issue and I'll try to reproduce. I'm just afraid of end users bugging admins about it.