metajack/strophejs-plugins

strophe plugin muc has not supported attributes in IE

hamradiodv opened this issue · 0 comments

When i using muc plugin in IE, i has serious problem with unsupported attributes.

In code:

XmppRoom._parsePresence = function(pres) {
var a, c, c2, data, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
data = {};
a = pres.attributes;
data.nick = Strophe.getResourceFromJid(a.from.textContent);
data.type = ((_ref = a.type) != null ? _ref.textContent : void 0) || null;

Result

In IE "a.from" is not supported !
"textContent" is not supported too !

I make some workaround this problem:

  var from = (a.from != null) ? a.from.textContent : a[2].nodeValue;
  data.nick = Strophe.getResourceFromJid(from);

Thanks