Don't show chat-state notifications by default.

This commit is contained in:
JC Brand 2017-02-14 13:00:45 +00:00
parent 33fad75154
commit 7b65155d5b
3 changed files with 12 additions and 1 deletions

View File

@ -10,6 +10,9 @@
- Improved roster filter UX. [jcbrand]
- Render the login form again upon authfail. [jcbrand]
- New promises API: [waitUntil](https://conversejs.org/docs/html/developer_api.html#waituntil) [jcbrand]
- New configuration setting:
[show_chatstate_notifications](https://conversejs.org/docs/html/configuration.html#show-chatstate-notifications)
[jcbrand]
- #770 Allow setting contact attrs on chats.open [Ape]
## 2.0.6 (2017-02-13)

View File

@ -885,6 +885,13 @@ configured.
Converse.js can only show users and groups that were previously configured
elsewhere.
show_chatstate_notifications
----------------------------
* Default: ``false``
Specifies whether chat state (online, dnd, away) HTML5 desktop notifications should be shown.
show_controlbox_by_default
--------------------------

View File

@ -32,6 +32,7 @@
this.updateSettings({
notify_all_room_messages: false,
show_desktop_notifications: true,
show_chatstate_notifications: false,
chatstate_notification_blacklist: [],
// ^ a list of JIDs to ignore concerning chat state notifications
play_sounds: false,
@ -211,7 +212,7 @@
* Will show an HTML5 notification to indicate that the chat
* status has changed.
*/
if (_converse.areDesktopNotificationsEnabled()) {
if (_converse.areDesktopNotificationsEnabled() && _converse.show_chatstate_notifications) {
_converse.showChatStateNotification(contact);
}
};