@@ -14677,14 +14677,35 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
...
@@ -14677,14 +14677,35 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
};
};
u.parseMemberListIQ = function parseMemberListIQ(iq) {
u.parseMemberListIQ = function parseMemberListIQ(iq) {
/* Given an IQ stanza with a member list, create an array of member
/* Given an IQ stanza with a member list, create an array of member objects.
* objects.
*/
*/
return _.map(sizzle("query[xmlns=\"".concat(Strophe.NS.MUC_ADMIN, "\"] item"), iq), function (item) {
return _.map(sizzle("query[xmlns=\"".concat(Strophe.NS.MUC_ADMIN, "\"] item"), iq), function (item) {
return {
var data = {
'jid': item.getAttribute('jid'),
'affiliation': item.getAttribute('affiliation')
'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
...
@@ -14714,7 +14735,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
'moderator': 1,
'moderator': 1,
'participant': 2,
'participant': 2,
'visitor': 3,
'visitor': 3,
'none': 4
'none': 2
};
};
var _converse$env = converse.env,
var _converse$env = converse.env,
Strophe = _converse$env.Strophe,
Strophe = _converse$env.Strophe,
...
@@ -14874,6 +14895,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
...
@@ -14874,6 +14895,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
this.occupants = new _converse.ChatRoomOccupants();
this.occupants = new _converse.ChatRoomOccupants();
this.occupants.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.occupants-".concat(_converse.bare_jid).concat(this.get('jid'))));
this.occupants.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.occupants-".concat(_converse.bare_jid).concat(this.get('jid'))));
_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.")]);
'message': __('An error happened while trying to save your profile data'),
@@ -47414,14 +47414,35 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
...
@@ -47414,14 +47414,35 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
};
};
u.parseMemberListIQ = function parseMemberListIQ(iq) {
u.parseMemberListIQ = function parseMemberListIQ(iq) {
/* Given an IQ stanza with a member list, create an array of member
/* Given an IQ stanza with a member list, create an array of member objects.
* objects.
*/
*/
return _.map(sizzle("query[xmlns=\"".concat(Strophe.NS.MUC_ADMIN, "\"] item"), iq), function (item) {
return _.map(sizzle("query[xmlns=\"".concat(Strophe.NS.MUC_ADMIN, "\"] item"), iq), function (item) {
return {
var data = {
'jid': item.getAttribute('jid'),
'affiliation': item.getAttribute('affiliation')
'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
...
@@ -47451,7 +47472,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
'moderator': 1,
'moderator': 1,
'participant': 2,
'participant': 2,
'visitor': 3,
'visitor': 3,
'none': 4
'none': 2
};
};
var _converse$env = converse.env,
var _converse$env = converse.env,
Strophe = _converse$env.Strophe,
Strophe = _converse$env.Strophe,
...
@@ -47611,6 +47632,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
...
@@ -47611,6 +47632,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
this.occupants = new _converse.ChatRoomOccupants();
this.occupants = new _converse.ChatRoomOccupants();
this.occupants.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.occupants-".concat(_converse.bare_jid).concat(this.get('jid'))));
this.occupants.browserStorage = new Backbone.BrowserStorage.session(b64_sha1("converse.occupants-".concat(_converse.bare_jid).concat(this.get('jid'))));
_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.")]);
'message': __('An error happened while trying to save your profile data'),