@@ -14677,14 +14677,35 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
};
u.parseMemberListIQ = function parseMemberListIQ(iq) {
/* Given an IQ stanza with a member list, create an array of member
* objects.
*/
/* Given an IQ stanza with a member list, create an array of member objects.
*/
return _.map(sizzle("query[xmlns=\"".concat(Strophe.NS.MUC_ADMIN, "\"] item"), iq), function (item) {
return {
'jid': item.getAttribute('jid'),
var data = {
'affiliation': item.getAttribute('affiliation')
};
var jid = item.getAttribute('jid');
if (u.isValidJID(jid)) {
data['jid'] = jid;
} else {
// XXX: Prosody sends nick for the jid attribute value
// Perhaps for anonymous room?
data['nick'] = jid;
}
var nick = item.getAttribute('nick');
if (nick) {
data['nick'] = nick;
}
var role = item.getAttribute('role');
if (role) {
data['role'] = nick;
}
return data;
});
};
...
...
@@ -14714,7 +14735,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
'moderator': 1,
'participant': 2,
'visitor': 3,
'none': 4
'none': 2
};
var _converse$env = converse.env,
Strophe = _converse$env.Strophe,
...
...
@@ -14874,6 +14895,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
this.occupants = new _converse.ChatRoomOccupants();
this.occupants.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.occupants-".concat(_converse.bare_jid).concat(this.get('jid'))));
'message': __('An error happened while trying to save your profile data'),
'type': 'alert-danger'
});
body.insertAdjacentHTML('afterBegin', html);
_converse.api.alert.show(Strophe.LogLevel.ERROR, __('Error'), [__("Sorry, an error happened while trying to save your profile data."), __("You can check your browser's developer console for any error output.")]);
@@ -47414,14 +47414,35 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
};
u.parseMemberListIQ = function parseMemberListIQ(iq) {
/* Given an IQ stanza with a member list, create an array of member
* objects.
*/
/* Given an IQ stanza with a member list, create an array of member objects.
*/
return _.map(sizzle("query[xmlns=\"".concat(Strophe.NS.MUC_ADMIN, "\"] item"), iq), function (item) {
return {
'jid': item.getAttribute('jid'),
var data = {
'affiliation': item.getAttribute('affiliation')
};
var jid = item.getAttribute('jid');
if (u.isValidJID(jid)) {
data['jid'] = jid;
} else {
// XXX: Prosody sends nick for the jid attribute value
// Perhaps for anonymous room?
data['nick'] = jid;
}
var nick = item.getAttribute('nick');
if (nick) {
data['nick'] = nick;
}
var role = item.getAttribute('role');
if (role) {
data['role'] = nick;
}
return data;
});
};
...
...
@@ -47451,7 +47472,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
'moderator': 1,
'participant': 2,
'visitor': 3,
'none': 4
'none': 2
};
var _converse$env = converse.env,
Strophe = _converse$env.Strophe,
...
...
@@ -47611,6 +47632,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
this.occupants = new _converse.ChatRoomOccupants();
this.occupants.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.occupants-".concat(_converse.bare_jid).concat(this.get('jid'))));
'message': __('An error happened while trying to save your profile data'),
'type': 'alert-danger'
});
body.insertAdjacentHTML('afterBegin', html);
_converse.api.alert.show(Strophe.LogLevel.ERROR, __('Error'), [__("Sorry, an error happened while trying to save your profile data."), __("You can check your browser's developer console for any error output.")]);