Parcourir la source

Bugfix. OTR meta-messages were being shown in HTML5 notifications

JC Brand il y a 8 ans
Parent
commit
15f6649ace
2 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 3 2
      docs/CHANGES.md
  2. 1 1
      src/utils.js

+ 3 - 2
docs/CHANGES.md

@@ -9,8 +9,9 @@
 - sinon 2.1.0
 - sinon 2.1.0
 - eslint 3.19.0
 - eslint 3.19.0
 
 
-- Bugfix. MUC user's nickname wasn't being shown in HTML5 notification messages. [jcbrand]
-- CSS fix. Icon lock wasn't showing. [jcbrand]
+- Bugfix: MUC user's nickname wasn't being shown in HTML5 notification messages. [jcbrand]
+- Bugfix: OTR meta-messages were being shown in HTML5 notifications. [jcbrand]
+- CSS fix: Icon lock wasn't showing. [jcbrand]
 - #842 Persistent muc room creation not working [jcbrand]
 - #842 Persistent muc room creation not working [jcbrand]
 - #849 `TypeError: _converse.i18n.locale_data is undefined` when reconnecting. [jcbrand]
 - #849 `TypeError: _converse.i18n.locale_data is undefined` when reconnecting. [jcbrand]
 
 

+ 1 - 1
src/utils.js

@@ -223,7 +223,7 @@
 
 
         isOTRMessage: function (message) {
         isOTRMessage: function (message) {
             var body = message.querySelector('body'),
             var body = message.querySelector('body'),
-                text = (!_.isNull(body) ? body.textNode : undefined);
+                text = (!_.isNull(body) ? body.textContent: undefined);
             return text && !!text.match(/^\?OTR/);
             return text && !!text.match(/^\?OTR/);
         },
         },