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 @@
* (XMLElement) pres: A <presence> stanza.
*/
var item = sizzle('x[xmlns="'+Strophe.NS.MUC_USER+'"] item', pres).pop();
if (_.isNil(item)) { return; }
var jid = item.getAttribute('jid');
if (utils.isSameBareJID(jid, _converse.connection.jid)) {
var is_self = pres.querySelector("status[code='110']");
if (is_self && !_.isNil(item)) {
var affiliation = item.getAttribute('affiliation');
var role = item.getAttribute('role');
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