# User specific setting to require user interaction before closing desktop notifications

**URL:** <https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687>\
**Category:** Feature Requests (historic archive)\
**Created:** [December 14, 2018, 8:01am UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687 "2018-12-14T08:01:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpDBL](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mpDBL](https://forums.rocket.chat/u/mpDBL)\
**Post date:** [December 14, 2018, 8:01am UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687/1 "2018-12-14T08:01:34Z")

</div>

### 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](https://googlechrome.github.io/samples/notifications/requireInteraction.html)

---

<div class="post-metadata">

**Author:** ![NathanR](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/nathanr/32/629_2.png) [@NathanR](https://forums.rocket.chat/u/NathanR)\
**Post date:** [January 21, 2019, 9:56pm UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687/2 "2019-01-21T21:56:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mpDBL](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mpDBL](https://forums.rocket.chat/u/mpDBL)\
**Post date:** [June 17, 2019, 7:05am UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687/3 "2019-06-17T07:05:38Z")

</div>

Check [this](https://github.com/RocketChat/Rocket.Chat/pull/14807) out.

---

<div class="post-metadata">

**Author:** ![NathanR](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/nathanr/32/629_2.png) [@NathanR](https://forums.rocket.chat/u/NathanR)\
**Post date:** [June 19, 2019, 9:43pm UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687/4 "2019-06-19T21:43:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kgsunil140](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@kgsunil140](https://forums.rocket.chat/u/kgsunil140)\
**Post date:** [July 2, 2019, 10:33am UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687/5 "2019-07-02T10:33:00Z")

</div>

any update on this ?

---

<div class="post-metadata">

**Author:** ![mpDBL](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@mpDBL](https://forums.rocket.chat/u/mpDBL)\
**Post date:** [July 17, 2019, 7:45am UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687/6 "2019-07-17T07:45:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tasso.evangelista](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/tasso.evangelista/32/391_2.png) [@tasso.evangelista](https://forums.rocket.chat/u/tasso.evangelista)\
**Post date:** [July 17, 2019, 2:14pm UTC](https://forums.rocket.chat/t/user-specific-setting-to-require-user-interaction-before-closing-desktop-notifications/2687/7 "2019-07-17T14:14:22Z")

</div>

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