From a3bc7a18e5e43db2e455d1d1db7b6996270cf021 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 30 Nov 2016 18:39:53 +0100 Subject: [PATCH] Fixes #735. Querying by attribute returns empty list --- docs/CHANGES.md | 4 ++++ src/converse-muc.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/CHANGES.md b/docs/CHANGES.md index 297d65c08..471576dbb 100755 --- a/docs/CHANGES.md +++ b/docs/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.3 (2016-11-30) +- #735 Room configuration button not visible. [jcbrand] +- CSS fix for fadeIn animation. [jcbrand] + ## 2.0.2 (2016-11-30) - #721 keepalive not working with anonymous authentication [jcbrand] - #723 Bugfix: Arrays in configuration settings were ignored. [jcbrand] diff --git a/src/converse-muc.js b/src/converse-muc.js index c8e7d48d4..6b0c1dfed 100755 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -1138,8 +1138,12 @@ * See: http://xmpp.org/registrar/mucstatus.html */ var from_nick = Strophe.unescapeNode(Strophe.getResourceFromJid(presence.getAttribute('from'))); + // XXX: Unfortunately presence.querySelectorAll('x[xmlns="'+Strophe.NS.MUC_USER+'"]') returns [] + var elements = _.filter(presence.querySelectorAll('x'), function (x) { + return x.getAttribute('xmlns') === Strophe.NS.MUC_USER; + }); var notifications = _.map( - presence.querySelectorAll('x[xmlns="'+Strophe.NS.MUC_USER+'"]'), + elements, _.partial(this.parseXUserElement.bind(this), _, is_self, from_nick) ); _.each(notifications, this.displayNotificationsforUser.bind(this));