User specific setting to require user interaction before closing desktop notifications

Description:

Hi,

our rocket.chat users requested the desktop notifications to be visible for longer than the default time setting in the browser. The users aren’t always at their clients and the rocket.chat client in the browser is not always on top of other windows. By providing the optionally enabled means for an indefinite notification duration the possibility of user interaction with a hidden client increases.

I hereby propose the additional user specific setting DesktopNotifications_requireInteraction, only used when Setting desktopNotifications is set to anything else than nothing,
and the global settings value
Accounts_Default_User_Preferences_desktopNotifications_requireInteraction as a boolean value (default false) which is used to supply the default value.

The user specific setting DesktopNotifications_requireInteraction shall determine whether the Desktop Notifications shall remain visible until the user actively closes them or until the default Browser setting for maximum visibility duration.
This can be achieved by adding the parameter requireInteraction: true; to the Notification (see reference example at the bottom) when the users setting is anything else than desktopNotifications: "nothing"

Steps to reproduce (for Google Chrome):

  • Enable desktop notifications for test user in rocket.chat and browser settings
  • minimize Chrome client window
  • open Incognito Chrome client window instance
  • login with second user
  • send private message to first user

Current behavior :

The desktop notification is shown for up to about 20s.

Proposed behavior:

DesktopNotifications_requireInteraction: false; = The desktop notification is shown for up to about 20s.
or
DesktopNotifications_requireInteraction: true; = The desktop notification is shown indefinite until the user clicks on it or disables it.

This would enable users with shorter or longer absence intervals to get to the incoming messages when returning to their clients when the rocket.chat client window is not shown on top

Client Information

Google Chrome Version 70.0.3538.110
but also minor versions down to 51.0. …

Server Setup Information:

Version of Rocket.Chat Server:
Operating System: 0.70.4
Deployment Method: docker
Number of Running Instances: 3
DB Replicaset Oplog: true
NodeJS Version: 8.11.3 - x64
MongoDB Version: 3.6

for Reference

requireInteraction Example

We could really use this feature. Since we rolled this out to a company of 50 users it’s been the number one request.

Check this out.

This looks promising. So maybe available in the next build? But it looks like this only works in the browser? What about the desktop clients?

any update on this ?

Yes, this is only available for chrome and some other browsers like Edge supporting the Notification.requireInteraction parameter. I have not looked into the desktop client and my ressources are limited so I don’t think I’ll find time to dive into that.

Since the forum is deprecated for feature requests, I moved this discussion to GitHub: https://github.com/RocketChat/feature-requests/issues/155