فهرست منبع

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

JC Brand 8 سال پیش
والد
کامیت
c11a1b40e8
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      src/converse-muc.js

+ 2 - 3
src/converse-muc.js

@@ -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) {