Commit f7637578 authored by JC Brand's avatar JC Brand

No need for variables

parent feac7363
...@@ -835,35 +835,22 @@ ...@@ -835,35 +835,22 @@
null, null,
$.proxy(function (stanza) { $.proxy(function (stanza) {
var $stanza = $(stanza); var $stanza = $(stanza);
// All MUC features shown here: http://xmpp.org/registrar/disco-features.html // All MUC features found here: http://xmpp.org/registrar/disco-features.html
var desc = $stanza.find('field[var="muc#roominfo_description"] value').text();
var occ = $stanza.find('field[var="muc#roominfo_occupants"] value').text();
var hidden = $stanza.find('feature[var="muc_hidden"]').length;
var membersonly = $stanza.find('feature[var="muc_membersonly"]').length;
var moderated = $stanza.find('feature[var="muc_moderated"]').length;
var nonanonymous = $stanza.find('feature[var="muc_nonanonymous"]').length;
var open = $stanza.find('feature[var="muc_open"]').length;
var passwordprotected = $stanza.find('feature[var="muc_passwordprotected"]').length;
var persistent = $stanza.find('feature[var="muc_persistent"]').length;
var publicroom = $stanza.find('feature[var="muc_public"]').length;
var semianonymous = $stanza.find('feature[var="muc_semianonymous"]').length;
var temporary = $stanza.find('feature[var="muc_temporary"]').length;
var unmoderated = $stanza.find('feature[var="muc_unmoderated"]').length;
$dd.find('img.spinner').replaceWith( $dd.find('img.spinner').replaceWith(
this.room_description_template({ this.room_description_template({
'desc':desc, 'desc': $stanza.find('field[var="muc#roominfo_description"] value').text(),
'occ':occ, 'occ': $stanza.find('field[var="muc#roominfo_occupants"] value').text(),
'hidden':hidden, 'hidden': $stanza.find('feature[var="muc_hidden"]').length,
'membersonly':membersonly, 'membersonly': $stanza.find('feature[var="muc_membersonly"]').length,
'moderated':moderated, 'moderated': $stanza.find('feature[var="muc_moderated"]').length,
'nonanonymous':nonanonymous, 'nonanonymous': $stanza.find('feature[var="muc_nonanonymous"]').length,
'open':open, 'open': $stanza.find('feature[var="muc_open"]').length,
'passwordprotected':passwordprotected, 'passwordprotected': $stanza.find('feature[var="muc_passwordprotected"]').length,
'persistent':persistent, 'persistent': stanza.find('feature[var="muc_persistent"]').length,
'publicroom': publicroom, 'publicroom': $stanza.find('feature[var="muc_public"]').length,
'semianonymous':semianonymous, 'semianonymous': $stanza.find('feature[var="muc_semianonymous"]').length,
'temporary':temporary, 'temporary': $stanza.find('feature[var="muc_temporary"]').length,
'unmoderated':unmoderated 'unmoderated': $stanza.find('feature[var="muc_unmoderated"]').length
})); }));
}, this)); }, this));
} }
......
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