浏览代码

Fixes #1403: Rename `show_chatstate_notifications`

to `show_chat_state_notifications`
JC Brand 6 年之前
父节点
当前提交
7861ed7b54
共有 4 个文件被更改,包括 8 次插入7 次删除
  1. 2 1
      CHANGES.md
  2. 2 2
      docs/source/configuration.rst
  3. 2 2
      spec/notification.js
  4. 2 2
      src/converse-notification.js

+ 2 - 1
CHANGES.md

@@ -10,6 +10,7 @@
 - Groupchat default configuration now supports `list-multi` fields
 - Groupchat default configuration now supports `list-multi` fields
 - Bugfix: Don't set `muc_domain` for roomspanel if `locked_muc_domain` is `true`.
 - Bugfix: Don't set `muc_domain` for roomspanel if `locked_muc_domain` is `true`.
 - Bugfix: Modal auto-closes when you open it for a second time.
 - Bugfix: Modal auto-closes when you open it for a second time.
+- Bugfix: `Cannot read property 'parentElement' of null` in shadow DOM
 - Take roster nickname into consideration when rendering messages and chat headings.
 - Take roster nickname into consideration when rendering messages and chat headings.
 - Hide the textarea when a user is muted in a groupchat.
 - Hide the textarea when a user is muted in a groupchat.
 - Don't restore a BOSH session without knowing the JID
 - Don't restore a BOSH session without knowing the JID
@@ -58,7 +59,6 @@
 - #1579: Trim spaces at the beginning and end of a JID (when adding contact)
 - #1579: Trim spaces at the beginning and end of a JID (when adding contact)
 - #1585: Upload files by pasting from clipboard
 - #1585: Upload files by pasting from clipboard
 - #1586: Not possible to kick someone with a space in their nickname
 - #1586: Not possible to kick someone with a space in their nickname
-- Bugfix: "Cannot read property 'parentElement' of null" in shadow dom
 
 
 ### Breaking changes
 ### Breaking changes
 
 
@@ -75,6 +75,7 @@
 - Removed events `statusChanged` and `statusMessageChanged`. Instead, you can
 - Removed events `statusChanged` and `statusMessageChanged`. Instead, you can
   listen on the `change:status` or `change:status\_message` events on
   listen on the `change:status` or `change:status\_message` events on
   `_converse.xmppstatus`.
   `_converse.xmppstatus`.
+- #1403: Rename show_chatstate_notifications to show_chat_state_notifications
 
 
 ### API changes
 ### API changes
 
 

+ 2 - 2
docs/source/configuration.rst

@@ -1334,8 +1334,8 @@ If set to ``true``, Converse will show any roster groups you might have configur
     Converse can only show users and groups that were previously configured
     Converse can only show users and groups that were previously configured
     elsewhere.
     elsewhere.
 
 
-show_chatstate_notifications
-----------------------------
+show_chat_state_notifications
+-----------------------------
 
 
 * Default:  ``false``
 * Default:  ``false``
 
 

+ 2 - 2
spec/notification.js

@@ -139,9 +139,9 @@
                         done();
                         done();
                     }));
                     }));
 
 
-                    it("is shown when a user changes their chat state (if show_chatstate_notifications is true)", mock.initConverse((done, _converse) => {
+                    it("is shown when a user changes their chat state (if show_chat_state_notifications is true)", mock.initConverse((done, _converse) => {
                         // TODO: not yet testing show_desktop_notifications setting
                         // TODO: not yet testing show_desktop_notifications setting
-                        _converse.show_chatstate_notifications = true;
+                        _converse.show_chat_state_notifications = true;
 
 
                         test_utils.createContacts(_converse, 'current');
                         test_utils.createContacts(_converse, 'current');
                         spyOn(_converse, 'areDesktopNotificationsEnabled').and.returnValue(true);
                         spyOn(_converse, 'areDesktopNotificationsEnabled').and.returnValue(true);

+ 2 - 2
src/converse-notification.js

@@ -29,7 +29,7 @@ converse.plugins.add('converse-notification', {
         _converse.api.settings.update({
         _converse.api.settings.update({
             notify_all_room_messages: false,
             notify_all_room_messages: false,
             show_desktop_notifications: true,
             show_desktop_notifications: true,
-            show_chatstate_notifications: false,
+            show_chat_state_notifications: false,
             chatstate_notification_blacklist: [],
             chatstate_notification_blacklist: [],
             // ^ a list of JIDs to ignore concerning chat state notifications
             // ^ a list of JIDs to ignore concerning chat state notifications
             play_sounds: true,
             play_sounds: true,
@@ -248,7 +248,7 @@ converse.plugins.add('converse-notification', {
              * Will show an HTML5 notification to indicate that the chat
              * Will show an HTML5 notification to indicate that the chat
              * status has changed.
              * status has changed.
              */
              */
-            if (_converse.areDesktopNotificationsEnabled() && _converse.show_chatstate_notifications) {
+            if (_converse.areDesktopNotificationsEnabled() && _converse.show_chat_state_notifications) {
                 _converse.showChatStateNotification(contact);
                 _converse.showChatStateNotification(contact);
             }
             }
         };
         };