Commit c11a1b40 authored by JC Brand's avatar JC Brand

muc: bugfix, presence referring to current user doesn't have a jid attr

parent ea04b117
...@@ -1715,9 +1715,8 @@ ...@@ -1715,9 +1715,8 @@
* (XMLElement) pres: A <presence> stanza. * (XMLElement) pres: A <presence> stanza.
*/ */
var item = sizzle('x[xmlns="'+Strophe.NS.MUC_USER+'"] item', pres).pop(); var item = sizzle('x[xmlns="'+Strophe.NS.MUC_USER+'"] item', pres).pop();
if (_.isNil(item)) { return; } var is_self = pres.querySelector("status[code='110']");
var jid = item.getAttribute('jid'); if (is_self && !_.isNil(item)) {
if (utils.isSameBareJID(jid, _converse.connection.jid)) {
var affiliation = item.getAttribute('affiliation'); var affiliation = item.getAttribute('affiliation');
var role = item.getAttribute('role'); var role = item.getAttribute('role');
if (affiliation) { if (affiliation) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment