Bläddra i källkod

Fixes #1403: Rename `show_chatstate_notifications`

to `show_chat_state_notifications`
JC Brand 6 år sedan
förälder
incheckning
7861ed7b54
4 ändrade filer med 8 tillägg och 7 borttagningar
  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
 - 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: `Cannot read property 'parentElement' of null` in shadow DOM
 - Take roster nickname into consideration when rendering messages and chat headings.
 - Hide the textarea when a user is muted in a groupchat.
 - 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)
 - #1585: Upload files by pasting from clipboard
 - #1586: Not possible to kick someone with a space in their nickname
-- Bugfix: "Cannot read property 'parentElement' of null" in shadow dom
 
 ### Breaking changes
 
@@ -75,6 +75,7 @@
 - Removed events `statusChanged` and `statusMessageChanged`. Instead, you can
   listen on the `change:status` or `change:status\_message` events on
   `_converse.xmppstatus`.
+- #1403: Rename show_chatstate_notifications to show_chat_state_notifications
 
 ### 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
     elsewhere.
 
-show_chatstate_notifications
-----------------------------
+show_chat_state_notifications
+-----------------------------
 
 * Default:  ``false``
 

+ 2 - 2
spec/notification.js

@@ -139,9 +139,9 @@
                         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
-                        _converse.show_chatstate_notifications = true;
+                        _converse.show_chat_state_notifications = true;
 
                         test_utils.createContacts(_converse, 'current');
                         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({
             notify_all_room_messages: false,
             show_desktop_notifications: true,
-            show_chatstate_notifications: false,
+            show_chat_state_notifications: false,
             chatstate_notification_blacklist: [],
             // ^ a list of JIDs to ignore concerning chat state notifications
             play_sounds: true,
@@ -248,7 +248,7 @@ converse.plugins.add('converse-notification', {
              * Will show an HTML5 notification to indicate that the chat
              * status has changed.
              */
-            if (_converse.areDesktopNotificationsEnabled() && _converse.show_chatstate_notifications) {
+            if (_converse.areDesktopNotificationsEnabled() && _converse.show_chat_state_notifications) {
                 _converse.showChatStateNotification(contact);
             }
         };