Commit 8ba8a4bc authored by Christoph Scholz's avatar Christoph Scholz Committed by JC Brand

new value 'all' for 'show_desktop_notifications'

parent 1bdb1716
......@@ -8,6 +8,7 @@
- #1268 Switch from SASS variables to CSS custom properties
- #1278 Replace the default avatar with a SVG version
- #1306 added option `notification_delay`
- #1305 added value 'all' for 'show_desktop_notifications' to notifiy even if converse.js is open
## 4.0.4 (2018-10-29)
......
......@@ -1247,12 +1247,15 @@ show_desktop_notifications
Should HTML5 desktop notifications be shown?
Notification will be shown in the following cases:
If set to ``true``, notifications will be shown in the following cases:
* the browser is not visible nor focused and a private message is received.
* the browser is not visible nor focused and a groupchat message is received which mentions you.
* `auto_subscribe` is set to `false` and a new contact request is received.
If set to ``all``, notifications will be shown even if the above conditions are
not fulfilled.
Requires the `src/converse-notification.js` plugin.
use_system_emojis
......
......@@ -100,7 +100,7 @@ converse.plugins.add('converse-notification', {
message.getAttribute('from')) === _converse.bare_jid;
return !_converse.isOnlyChatStateNotification(message) &&
!is_me &&
_converse.isMessageToHiddenChat(message);
(_converse.show_desktop_notifications === 'all' || _converse.isMessageToHiddenChat(message));
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment