Commit 7fafc675 authored by JC Brand's avatar JC Brand

Updated build

parent 964b10dc
...@@ -36,19 +36,34 @@ ...@@ -36,19 +36,34 @@
/******/ // define getter function for harmony exports /******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) { /******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) { /******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ } /******/ }
/******/ }; /******/ };
/******/ /******/
/******/ // define __esModule on exports /******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) { /******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ }; /******/ };
/******/ /******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules /******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) { /******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ? /******/ var getter = module && module.__esModule ?
...@@ -2560,13 +2575,7 @@ backbone.nativeview = __webpack_require__(/*! backbone.nativeview */ "./node_mod ...@@ -2560,13 +2575,7 @@ backbone.nativeview = __webpack_require__(/*! backbone.nativeview */ "./node_mod
if (_.isFunction(this.beforeRender)) { if (_.isFunction(this.beforeRender)) {
this.beforeRender(); this.beforeRender();
} }
let new_vnode; const new_vnode = tovnode.toVNode(parseHTMLToDOM(this.toHTML()));
if (!_.isNil(this.toHTML)) {
new_vnode = tovnode.toVNode(parseHTMLToDOM(this.toHTML()));
} else {
new_vnode = tovnode.toVNode(this.toDOM());
}
new_vnode.data.hook = _.extend({ new_vnode.data.hook = _.extend({
create: this.updateEventListeners.bind(this), create: this.updateEventListeners.bind(this),
update: this.updateEventListeners.bind(this) update: this.updateEventListeners.bind(this)
...@@ -33079,13 +33088,12 @@ var map = { ...@@ -33079,13 +33088,12 @@ var map = {
function webpackContext(req) { function webpackContext(req) {
var id = webpackContextResolve(req); var id = webpackContextResolve(req);
var module = __webpack_require__(id); return __webpack_require__(id);
return module;
} }
function webpackContextResolve(req) { function webpackContextResolve(req) {
var id = map[req]; var id = map[req];
if(!(id + 1)) { // check for number or string if(!(id + 1)) { // check for number or string
var e = new Error('Cannot find module "' + req + '".'); var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND'; e.code = 'MODULE_NOT_FOUND';
throw e; throw e;
} }
...@@ -67639,7 +67647,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -67639,7 +67647,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
checkForReservedNick() { checkForReservedNick() {
/* Check if the user has a bookmark with a saved nickanme /* Check if the user has a bookmark with a saved nickanme
* for this room, and if so use it. * for this groupchat, and if so use it.
* Otherwise delegate to the super method. * Otherwise delegate to the super method.
*/ */
const _converse = this.__super__._converse; const _converse = this.__super__._converse;
...@@ -67674,7 +67682,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -67674,7 +67682,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
setBookmarkState() { setBookmarkState() {
/* Set whether the room is bookmarked or not. /* Set whether the groupchat is bookmarked or not.
*/ */
const _converse = this.__super__._converse; const _converse = this.__super__._converse;
...@@ -67826,10 +67834,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -67826,10 +67834,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
openBookmarkedRoom(bookmark) { openBookmarkedRoom(bookmark) {
if (bookmark.get('autojoin')) { if (bookmark.get('autojoin')) {
const room = _converse.api.rooms.create(bookmark.get('jid'), bookmark.get('nick')); const groupchat = _converse.api.rooms.create(bookmark.get('jid'), bookmark.get('nick'));
if (!room.get('hidden')) { if (!groupchat.get('hidden')) {
room.trigger('show'); groupchat.trigger('show');
} }
} }
...@@ -67929,18 +67937,18 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -67929,18 +67937,18 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
markRoomAsBookmarked(bookmark) { markRoomAsBookmarked(bookmark) {
const room = _converse.chatboxes.get(bookmark.get('jid')); const groupchat = _converse.chatboxes.get(bookmark.get('jid'));
if (!_.isUndefined(room)) { if (!_.isUndefined(groupchat)) {
room.save('bookmarked', true); groupchat.save('bookmarked', true);
} }
}, },
markRoomAsUnbookmarked(bookmark) { markRoomAsUnbookmarked(bookmark) {
const room = _converse.chatboxes.get(bookmark.get('jid')); const groupchat = _converse.chatboxes.get(bookmark.get('jid'));
if (!_.isUndefined(room)) { if (!_.isUndefined(groupchat)) {
room.save('bookmarked', false); groupchat.save('bookmarked', false);
} }
}, },
...@@ -71371,7 +71379,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -71371,7 +71379,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_.extend(_converse, Backbone.Events); // Core plugins are whitelisted automatically _.extend(_converse, Backbone.Events); // Core plugins are whitelisted automatically
_converse.core_plugins = ['converse-bookmarks', 'converse-caps', 'converse-chatboxes', 'converse-chatview', 'converse-controlbox', 'converse-core', 'converse-disco', 'converse-dragresize', 'converse-embedded', 'converse-fullscreen', 'converse-headline', 'converse-mam', 'converse-message-view', 'converse-minimize', 'converse-modal', 'converse-muc', 'converse-muc-views', 'converse-notification', 'converse-oauth', 'converse-ping', 'converse-profile', 'converse-push', 'converse-register', 'converse-roomslist', 'converse-roster', 'converse-rosterview', 'converse-singleton', 'converse-spoilers', 'converse-vcard']; // Make converse pluggable _converse.core_plugins = ['converse-bookmarks', 'converse-caps', 'converse-chatboxes', 'converse-chatview', 'converse-controlbox', 'converse-core', 'converse-disco', 'converse-dragresize', 'converse-embedded', 'converse-fullscreen', 'converse-headline', 'converse-mam', 'converse-message-view', 'converse-minimize', 'converse-modal', 'converse-muc', 'converse-muc-views', 'converse-notification', 'converse-oauth', 'converse-ping', 'converse-profile', 'converse-push', 'converse-register', 'converse-roomslist', 'converse-roster', 'converse-rosterview', 'converse-singleton', 'converse-spoilers', 'converse-vcard']; // Setting wait to 59 instead of 60 to avoid timing conflicts with the
// webserver, which is often also set to 60 and might therefore sometimes
// return a 504 error page instead of passing through to the BOSH proxy.
const BOSH_WAIT = 59; // Make converse pluggable
pluggable.enable(_converse, '_converse', 'pluggable'); // Module-level constants pluggable.enable(_converse, '_converse', 'pluggable'); // Module-level constants
...@@ -72375,7 +72387,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -72375,7 +72387,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.connection.reset(); this.connection.reset();
} }
this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged); this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged, BOSH_WAIT);
} else if (this.authentication === _converse.LOGIN) { } else if (this.authentication === _converse.LOGIN) {
const password = _.isNil(credentials) ? _converse.connection.pass || this.password : credentials.password; const password = _.isNil(credentials) ? _converse.connection.pass || this.password : credentials.password;
...@@ -72403,7 +72415,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -72403,7 +72415,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.connection.reset(); this.connection.reset();
} }
this.connection.connect(this.jid, password, this.onConnectStatusChanged); this.connection.connect(this.jid, password, this.onConnectStatusChanged, BOSH_WAIT);
} }
}; };
...@@ -75761,25 +75773,25 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75761,25 +75773,25 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
} }
/* http://xmpp.org/extensions/xep-0045.html /* http://xmpp.org/extensions/xep-0045.html
* ---------------------------------------- * ----------------------------------------
* 100 message Entering a room Inform user that any occupant is allowed to see the user's full JID * 100 message Entering a groupchat Inform user that any occupant is allowed to see the user's full JID
* 101 message (out of band) Affiliation change Inform user that his or her affiliation changed while not in the room * 101 message (out of band) Affiliation change Inform user that his or her affiliation changed while not in the groupchat
* 102 message Configuration change Inform occupants that room now shows unavailable members * 102 message Configuration change Inform occupants that groupchat now shows unavailable members
* 103 message Configuration change Inform occupants that room now does not show unavailable members * 103 message Configuration change Inform occupants that groupchat now does not show unavailable members
* 104 message Configuration change Inform occupants that a non-privacy-related room configuration change has occurred * 104 message Configuration change Inform occupants that a non-privacy-related groupchat configuration change has occurred
* 110 presence Any room presence Inform user that presence refers to one of its own room occupants * 110 presence Any groupchat presence Inform user that presence refers to one of its own groupchat occupants
* 170 message or initial presence Configuration change Inform occupants that room logging is now enabled * 170 message or initial presence Configuration change Inform occupants that groupchat logging is now enabled
* 171 message Configuration change Inform occupants that room logging is now disabled * 171 message Configuration change Inform occupants that groupchat logging is now disabled
* 172 message Configuration change Inform occupants that the room is now non-anonymous * 172 message Configuration change Inform occupants that the groupchat is now non-anonymous
* 173 message Configuration change Inform occupants that the room is now semi-anonymous * 173 message Configuration change Inform occupants that the groupchat is now semi-anonymous
* 174 message Configuration change Inform occupants that the room is now fully-anonymous * 174 message Configuration change Inform occupants that the groupchat is now fully-anonymous
* 201 presence Entering a room Inform user that a new room has been created * 201 presence Entering a groupchat Inform user that a new groupchat has been created
* 210 presence Entering a room Inform user that the service has assigned or modified the occupant's roomnick * 210 presence Entering a groupchat Inform user that the service has assigned or modified the occupant's roomnick
* 301 presence Removal from room Inform user that he or she has been banned from the room * 301 presence Removal from groupchat Inform user that he or she has been banned from the groupchat
* 303 presence Exiting a room Inform all occupants of new room nickname * 303 presence Exiting a groupchat Inform all occupants of new groupchat nickname
* 307 presence Removal from room Inform user that he or she has been kicked from the room * 307 presence Removal from groupchat Inform user that he or she has been kicked from the groupchat
* 321 presence Removal from room Inform user that he or she is being removed from the room because of an affiliation change * 321 presence Removal from groupchat Inform user that he or she is being removed from the groupchat because of an affiliation change
* 322 presence Removal from room Inform user that he or she is being removed from the room because the room has been changed to members-only and the user is not a member * 322 presence Removal from groupchat Inform user that he or she is being removed from the groupchat because the groupchat has been changed to members-only and the user is not a member
* 332 presence Removal from room Inform user that he or she is being removed from the room because of a system shutdown * 332 presence Removal from groupchat Inform user that he or she is being removed from the groupchat because of a system shutdown
*/ */
...@@ -75827,12 +75839,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75827,12 +75839,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}; };
function insertRoomInfo(el, stanza) { function insertRoomInfo(el, stanza) {
/* Insert room info (based on returned #disco IQ stanza) /* Insert groupchat info (based on returned #disco IQ stanza)
* *
* Parameters: * Parameters:
* (HTMLElement) el: The HTML DOM element that should * (HTMLElement) el: The HTML DOM element that should
* contain the info. * contain the info.
* (XMLElement) stanza: The IQ stanza containing the room * (XMLElement) stanza: The IQ stanza containing the groupchat
* info. * info.
*/ */
// All MUC features found here: http://xmpp.org/registrar/disco-features.html // All MUC features found here: http://xmpp.org/registrar/disco-features.html
...@@ -75872,7 +75884,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75872,7 +75884,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
} }
function toggleRoomInfo(ev) { function toggleRoomInfo(ev) {
/* Show/hide extra information about a room in a listing. */ /* Show/hide extra information about a groupchat in a listing. */
const parent_el = u.ancestor(ev.target, '.room-item'), const parent_el = u.ancestor(ev.target, '.room-item'),
div_el = parent_el.querySelector('div.room-info'); div_el = parent_el.querySelector('div.room-info');
...@@ -75905,7 +75917,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75905,7 +75917,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
return tpl_list_chatrooms_modal(_.extend(this.model.toJSON(), { return tpl_list_chatrooms_modal(_.extend(this.model.toJSON(), {
'heading_list_chatrooms': __('Query for Groupchats'), 'heading_list_chatrooms': __('Query for Groupchats'),
'label_server_address': __('Server address'), 'label_server_address': __('Server address'),
'label_query': __('Show rooms'), 'label_query': __('Show groupchats'),
'server_placeholder': __('conference.example.org') 'server_placeholder': __('conference.example.org')
})); }));
}, },
...@@ -75938,12 +75950,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75938,12 +75950,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
} }
}, },
roomStanzaItemToHTMLElement(room) { roomStanzaItemToHTMLElement(groupchat) {
const name = Strophe.unescapeNode(room.getAttribute('name') || room.getAttribute('jid')); const name = Strophe.unescapeNode(groupchat.getAttribute('name') || groupchat.getAttribute('jid'));
const div = document.createElement('div'); const div = document.createElement('div');
div.innerHTML = tpl_room_item({ div.innerHTML = tpl_room_item({
'name': Strophe.xmlunescape(name), 'name': Strophe.xmlunescape(name),
'jid': room.getAttribute('jid'), 'jid': groupchat.getAttribute('jid'),
'open_title': __('Click to open this groupchat'), 'open_title': __('Click to open this groupchat'),
'info_title': __('Show more information on this groupchat') 'info_title': __('Show more information on this groupchat')
}); });
...@@ -75957,7 +75969,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75957,7 +75969,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
informNoRoomsFound() { informNoRoomsFound() {
const chatrooms_el = this.el.querySelector('.available-chatrooms'); const chatrooms_el = this.el.querySelector('.available-chatrooms');
chatrooms_el.innerHTML = tpl_rooms_results({ chatrooms_el.innerHTML = tpl_rooms_results({
'feedback_text': __('No rooms found') 'feedback_text': __('No groupchats found')
}); });
const input_el = this.el.querySelector('input[name="server"]'); const input_el = this.el.querySelector('input[name="server"]');
input_el.classList.remove('hidden'); input_el.classList.remove('hidden');
...@@ -75966,7 +75978,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75966,7 +75978,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
onRoomsFound(iq) { onRoomsFound(iq) {
/* Handle the IQ stanza returned from the server, containing /* Handle the IQ stanza returned from the server, containing
* all its public rooms. * all its public groupchats.
*/ */
const available_chatrooms = this.el.querySelector('.available-chatrooms'); const available_chatrooms = this.el.querySelector('.available-chatrooms');
this.rooms = iq.querySelectorAll('query item'); this.rooms = iq.querySelectorAll('query item');
...@@ -75975,7 +75987,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75975,7 +75987,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
// For translators: %1$s is a variable and will be // For translators: %1$s is a variable and will be
// replaced with the XMPP server name // replaced with the XMPP server name
available_chatrooms.innerHTML = tpl_rooms_results({ available_chatrooms.innerHTML = tpl_rooms_results({
'feedback_text': __('Rooms found:') 'feedback_text': __('Groupchats found:')
}); });
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
...@@ -75993,7 +76005,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -75993,7 +76005,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
updateRoomsList() { updateRoomsList() {
/* Send an IQ stanza to the server asking for all rooms /* Send an IQ stanza to the server asking for all groupchats
*/ */
_converse.connection.sendIQ($iq({ _converse.connection.sendIQ($iq({
to: this.model.get('muc_domain'), to: this.model.get('muc_domain'),
...@@ -76089,7 +76101,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76089,7 +76101,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}); });
_converse.ChatRoomView = _converse.ChatBoxView.extend({ _converse.ChatRoomView = _converse.ChatBoxView.extend({
/* Backbone.NativeView which renders a chat room, based upon the view /* Backbone.NativeView which renders a groupchat, based upon the view
* for normal one-on-one chat boxes. * for normal one-on-one chat boxes.
*/ */
length: 300, length: 300,
...@@ -76181,12 +76193,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76181,12 +76193,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
renderHeading() { renderHeading() {
/* Render the heading UI of the chat room. */ /* Render the heading UI of the groupchat. */
this.el.querySelector('.chat-head-chatroom').innerHTML = this.generateHeadingHTML(); this.el.querySelector('.chat-head-chatroom').innerHTML = this.generateHeadingHTML();
}, },
renderChatArea() { renderChatArea() {
/* Render the UI container in which chat room messages will appear. /* Render the UI container in which groupchat messages will appear.
*/ */
if (_.isNull(this.el.querySelector('.chat-area'))) { if (_.isNull(this.el.querySelector('.chat-area'))) {
const container_el = this.el.querySelector('.chatroom-body'); const container_el = this.el.querySelector('.chatroom-body');
...@@ -76314,7 +76326,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76314,7 +76326,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
close(ev) { close(ev) {
/* Close this chat box, which implies leaving the room as /* Close this chat box, which implies leaving the groupchat as
* well. * well.
*/ */
this.hide(); this.hide();
...@@ -76407,13 +76419,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76407,13 +76419,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
} }
}, },
modifyRole(room, nick, role, reason, onSuccess, onError) { modifyRole(groupchat, nick, role, reason, onSuccess, onError) {
const item = $build("item", { const item = $build("item", {
nick, nick,
role role
}); });
const iq = $iq({ const iq = $iq({
to: room, to: groupchat,
type: "set" type: "set"
}).c("query", { }).c("query", {
xmlns: Strophe.NS.MUC_ADMIN xmlns: Strophe.NS.MUC_ADMIN
...@@ -76427,7 +76439,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76427,7 +76439,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
validateRoleChangeCommand(command, args) { validateRoleChangeCommand(command, args) {
/* Check that a command to change a chat room user's role or /* Check that a command to change a groupchat user's role or
* affiliation has anough arguments. * affiliation has anough arguments.
*/ */
// TODO check if first argument is valid // TODO check if first argument is valid
...@@ -76590,7 +76602,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76590,7 +76602,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
registerHandlers() { registerHandlers() {
/* Register presence and message handlers for this chat /* Register presence and message handlers for this chat
* room * groupchat
*/ */
// XXX: Ideally this can be refactored out so that we don't // XXX: Ideally this can be refactored out so that we don't
// need to do stanza processing inside the views in this // need to do stanza processing inside the views in this
...@@ -76630,12 +76642,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76630,12 +76642,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
join(nick, password) { join(nick, password) {
/* Join the chat room. /* Join the groupchat.
* *
* Parameters: * Parameters:
* (String) nick: The user's nickname * (String) nick: The user's nickname
* (String) password: Optional password, if required by * (String) password: Optional password, if required by
* the room. * the groupchat.
*/ */
if (!nick && !this.model.get('nick')) { if (!nick && !this.model.get('nick')) {
this.checkForReservedNick(); this.checkForReservedNick();
...@@ -76648,13 +76660,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76648,13 +76660,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
renderConfigurationForm(stanza) { renderConfigurationForm(stanza) {
/* Renders a form given an IQ stanza containing the current /* Renders a form given an IQ stanza containing the current
* room configuration. * groupchat configuration.
* *
* Returns a promise which resolves once the user has * Returns a promise which resolves once the user has
* either submitted the form, or canceled it. * either submitted the form, or canceled it.
* *
* Parameters: * Parameters:
* (XMLElement) stanza: The IQ stanza containing the room * (XMLElement) stanza: The IQ stanza containing the groupchat
* config. * config.
*/ */
const container_el = this.el.querySelector('.chatroom-body'); const container_el = this.el.querySelector('.chatroom-body');
...@@ -76707,7 +76719,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76707,7 +76719,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
getAndRenderConfigurationForm(ev) { getAndRenderConfigurationForm(ev) {
/* Start the process of configuring a chat room, either by /* Start the process of configuring a groupchat, either by
* rendering a configuration form, or by auto-configuring * rendering a configuration form, or by auto-configuring
* based on the "roomconfig" data stored on the * based on the "roomconfig" data stored on the
* Backbone.Model. * Backbone.Model.
...@@ -76727,7 +76739,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76727,7 +76739,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
submitNickname(ev) { submitNickname(ev) {
/* Get the nickname value from the form and then join the /* Get the nickname value from the form and then join the
* chat room with it. * groupchat with it.
*/ */
ev.preventDefault(); ev.preventDefault();
const nick_el = ev.target.nick; const nick_el = ev.target.nick;
...@@ -76746,7 +76758,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76746,7 +76758,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
checkForReservedNick() { checkForReservedNick() {
/* User service-discovery to ask the XMPP server whether /* User service-discovery to ask the XMPP server whether
* this user has a reserved nickname for this room. * this user has a reserved nickname for this groupchat.
* If so, we'll use that, otherwise we render the nickname form. * If so, we'll use that, otherwise we render the nickname form.
*/ */
this.showSpinner(); this.showSpinner();
...@@ -76757,7 +76769,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -76757,7 +76769,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
/* We've received an IQ response from the server which /* We've received an IQ response from the server which
* might contain the user's reserved nickname. * might contain the user's reserved nickname.
* If no nickname is found we either render a form for * If no nickname is found we either render a form for
* them to specify one, or we try to join the room with the * them to specify one, or we try to join the groupchat with the
* node of the user's JID. * node of the user's JID.
* *
* Parameters: * Parameters:
...@@ -77139,7 +77151,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77139,7 +77151,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
showErrorMessageFromPresence(presence) { showErrorMessageFromPresence(presence) {
// We didn't enter the room, so we must remove it from the MUC add-on // We didn't enter the groupchat, so we must remove it from the MUC add-on
const error = presence.querySelector('error'); const error = presence.querySelector('error');
if (error.getAttribute('type') === 'auth') { if (error.getAttribute('type') === 'auth') {
...@@ -77156,7 +77168,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77156,7 +77168,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
} }
} else if (error.getAttribute('type') === 'cancel') { } else if (error.getAttribute('type') === 'cancel') {
if (!_.isNull(error.querySelector('not-allowed'))) { if (!_.isNull(error.querySelector('not-allowed'))) {
this.showDisconnectMessages(__('You are not allowed to create new rooms.')); this.showDisconnectMessages(__('You are not allowed to create new groupchats.'));
} else if (!_.isNull(error.querySelector('not-acceptable'))) { } else if (!_.isNull(error.querySelector('not-acceptable'))) {
this.showDisconnectMessages(__("Your nickname doesn't conform to this groupchat's policies.")); this.showDisconnectMessages(__("Your nickname doesn't conform to this groupchat's policies."));
} else if (!_.isNull(error.querySelector('conflict'))) { } else if (!_.isNull(error.querySelector('conflict'))) {
...@@ -77180,7 +77192,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77180,7 +77192,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
renderAfterTransition() { renderAfterTransition() {
/* Rerender the room after some kind of transition. For /* Rerender the groupchat after some kind of transition. For
* example after the spinner has been removed or after a * example after the spinner has been removed or after a
* form has been submitted and removed. * form has been submitted and removed.
*/ */
...@@ -77254,8 +77266,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77254,8 +77266,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
render() { render() {
this.el.innerHTML = tpl_room_panel({ this.el.innerHTML = tpl_room_panel({
'heading_chatrooms': __('Groupchats'), 'heading_chatrooms': __('Groupchats'),
'title_new_room': __('Add a new room'), 'title_new_room': __('Add a new groupchat'),
'title_list_rooms': __('Query for rooms') 'title_list_rooms': __('Query for groupchats')
}); });
return this; return this;
}, },
...@@ -77430,7 +77442,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77430,7 +77442,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
promptForInvite(suggestion) { promptForInvite(suggestion) {
const reason = prompt(__('You are about to invite %1$s to the chat room "%2$s". ' + 'You may optionally include a message, explaining the reason for the invitation.', suggestion.text.label, this.model.get('id'))); const reason = prompt(__('You are about to invite %1$s to the groupchat "%2$s". ' + 'You may optionally include a message, explaining the reason for the invitation.', suggestion.text.label, this.model.get('id')));
if (reason !== null) { if (reason !== null) {
this.chatroomview.model.directInvite(suggestion.text.value, reason); this.chatroomview.model.directInvite(suggestion.text.value, reason);
...@@ -77510,7 +77522,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77510,7 +77522,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
function setMUCDomainFromDisco(controlboxview) { function setMUCDomainFromDisco(controlboxview) {
/* Check whether service discovery for the user's domain /* Check whether service discovery for the user's domain
* returned MUC information and use that to automatically * returned MUC information and use that to automatically
* set the MUC domain for the "Rooms" panel of the controlbox. * set the MUC domain in the "Add groupchat" modal.
*/ */
function featureAdded(feature) { function featureAdded(feature) {
if (feature.get('var') === Strophe.NS.MUC && f.includes('conference', feature.entity.identities.pluck('category'))) { if (feature.get('var') === Strophe.NS.MUC && f.includes('conference', feature.entity.identities.pluck('category'))) {
...@@ -77560,7 +77572,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77560,7 +77572,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
function reconnectToChatRooms() { function reconnectToChatRooms() {
/* Upon a reconnection event from converse, join again /* Upon a reconnection event from converse, join again
* all the open chat rooms. * all the open groupchats.
*/ */
_converse.chatboxviews.each(function (view) { _converse.chatboxviews.each(function (view) {
if (view.model.get('type') === converse.CHATROOMS_TYPE) { if (view.model.get('type') === converse.CHATROOMS_TYPE) {
...@@ -77660,12 +77672,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77660,12 +77672,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
// //
// New functions which don't exist yet can also be added. // New functions which don't exist yet can also be added.
tearDown() { tearDown() {
const rooms = this.chatboxes.where({ const groupchats = this.chatboxes.where({
'type': converse.CHATROOMS_TYPE 'type': converse.CHATROOMS_TYPE
}); });
_.each(rooms, function (room) { _.each(groupchats, function (groupchat) {
u.safeSave(room, { u.safeSave(groupchat, {
'connection_status': converse.ROOMSTATUS.DISCONNECTED 'connection_status': converse.ROOMSTATUS.DISCONNECTED
}); });
}); });
...@@ -77729,7 +77741,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77729,7 +77741,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.router.route('converse/room?jid=:jid', openRoom); _converse.router.route('converse/room?jid=:jid', openRoom);
_converse.openChatRoom = function (jid, settings, bring_to_foreground) { _converse.openChatRoom = function (jid, settings, bring_to_foreground) {
/* Opens a chat room, making sure that certain attributes /* Opens a groupchat, making sure that certain attributes
* are correct, for example that the "type" is set to * are correct, for example that the "type" is set to
* "chatroom". * "chatroom".
*/ */
...@@ -77779,7 +77791,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77779,7 +77791,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
registerHandlers() { registerHandlers() {
/* Register presence and message handlers for this chat /* Register presence and message handlers for this chat
* room * groupchat
*/ */
const room_jid = this.get('jid'); const room_jid = this.get('jid');
this.removeHandlers(); this.removeHandlers();
...@@ -77804,7 +77816,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77804,7 +77816,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
removeHandlers() { removeHandlers() {
/* Remove the presence and message handlers that were /* Remove the presence and message handlers that were
* registered for this chat room. * registered for this groupchat.
*/ */
if (this.message_handler) { if (this.message_handler) {
_converse.connection.deleteHandler(this.message_handler); _converse.connection.deleteHandler(this.message_handler);
...@@ -77843,12 +77855,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77843,12 +77855,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
join(nick, password) { join(nick, password) {
/* Join the chat room. /* Join the groupchat.
* *
* Parameters: * Parameters:
* (String) nick: The user's nickname * (String) nick: The user's nickname
* (String) password: Optional password, if required by * (String) password: Optional password, if required by
* the room. * the groupchat.
*/ */
nick = nick ? nick : this.get('nick'); nick = nick ? nick : this.get('nick');
...@@ -77857,7 +77869,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77857,7 +77869,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
} }
if (this.get('connection_status') === converse.ROOMSTATUS.ENTERED) { if (this.get('connection_status') === converse.ROOMSTATUS.ENTERED) {
// We have restored a chat room from session storage, // We have restored a groupchat from session storage,
// so we don't send out a presence stanza again. // so we don't send out a presence stanza again.
return this; return this;
} }
...@@ -77883,7 +77895,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77883,7 +77895,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
leave(exit_msg) { leave(exit_msg) {
/* Leave the chat room. /* Leave the groupchat.
* *
* Parameters: * Parameters:
* (String) exit_msg: Optional message to indicate your * (String) exit_msg: Optional message to indicate your
...@@ -77932,14 +77944,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77932,14 +77944,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
getRoomFeatures() { getRoomFeatures() {
/* Fetch the room disco info, parse it and then save it. /* Fetch the groupchat disco info, parse it and then save it.
*/ */
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
_converse.api.disco.info(this.get('jid'), null).then(stanza => { _converse.api.disco.info(this.get('jid'), null).then(stanza => {
this.parseRoomFeatures(stanza); this.parseRoomFeatures(stanza);
resolve(); resolve();
}).catch(err => { }).catch(err => {
_converse.log("Could not parse the room features", Strophe.LogLevel.WARN); _converse.log("Could not parse the groupchat features", Strophe.LogLevel.WARN);
_converse.log(err, Strophe.LogLevel.WARN); _converse.log(err, Strophe.LogLevel.WARN);
...@@ -77950,12 +77962,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77950,12 +77962,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
getRoomJIDAndNick(nick) { getRoomJIDAndNick(nick) {
/* Utility method to construct the JID for the current user /* Utility method to construct the JID for the current user
* as occupant of the room. * as occupant of the groupchat.
* *
* This is the room JID, with the user's nick added at the * This is the groupchat JID, with the user's nick added at the
* end. * end.
* *
* For example: room@conference.example.org/nickname * For example: groupchat@conference.example.org/nickname
*/ */
if (nick) { if (nick) {
this.save({ this.save({
...@@ -77965,8 +77977,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -77965,8 +77977,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
nick = this.get('nick'); nick = this.get('nick');
} }
const room = this.get('jid'); const groupchat = this.get('jid');
const jid = Strophe.getBareJidFromJid(room); const jid = Strophe.getBareJidFromJid(groupchat);
return jid + (nick !== null ? `/${nick}` : ""); return jid + (nick !== null ? `/${nick}` : "");
}, },
...@@ -78006,7 +78018,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78006,7 +78018,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
* (String) reason - Optional reason for the invitation * (String) reason - Optional reason for the invitation
*/ */
if (this.get('membersonly')) { if (this.get('membersonly')) {
// When inviting to a members-only room, we first add // When inviting to a members-only groupchat, we first add
// the person to the member list by giving them an // the person to the member list by giving them an
// affiliation of 'member' (if they're not affiliated // affiliation of 'member' (if they're not affiliated
// already), otherwise they won't be able to join. // already), otherwise they won't be able to join.
...@@ -78051,7 +78063,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78051,7 +78063,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
parseRoomFeatures(iq) { parseRoomFeatures(iq) {
/* Parses an IQ stanza containing the room's features. /* Parses an IQ stanza containing the groupchat's features.
* *
* See http://xmpp.org/extensions/xep-0045.html#disco-roominfo * See http://xmpp.org/extensions/xep-0045.html#disco-roominfo
* *
...@@ -78098,7 +78110,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78098,7 +78110,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
requestMemberList(affiliation) { requestMemberList(affiliation) {
/* Send an IQ stanza to the server, asking it for the /* Send an IQ stanza to the server, asking it for the
* member-list of this room. * member-list of this groupchat.
* *
* See: http://xmpp.org/extensions/xep-0045.html#modifymember * See: http://xmpp.org/extensions/xep-0045.html#modifymember
* *
...@@ -78157,7 +78169,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78157,7 +78169,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
saveConfiguration(form) { saveConfiguration(form) {
/* Submit the room configuration form by sending an IQ /* Submit the groupchat configuration form by sending an IQ
* stanza to the server. * stanza to the server.
* *
* Returns a promise which resolves once the XMPP server * Returns a promise which resolves once the XMPP server
...@@ -78177,7 +78189,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78177,7 +78189,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
autoConfigureChatRoom() { autoConfigureChatRoom() {
/* Automatically configure room based on this model's /* Automatically configure groupchat based on this model's
* 'roomconfig' data. * 'roomconfig' data.
* *
* Returns a promise which resolves once a response IQ has * Returns a promise which resolves once a response IQ has
...@@ -78224,7 +78236,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78224,7 +78236,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
fetchRoomConfiguration() { fetchRoomConfiguration() {
/* Send an IQ stanza to fetch the room configuration data. /* Send an IQ stanza to fetch the groupchat configuration data.
* Returns a promise which resolves once the response IQ * Returns a promise which resolves once the response IQ
* has been received. * has been received.
*/ */
...@@ -78239,17 +78251,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78239,17 +78251,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
sendConfiguration(config, callback, errback) { sendConfiguration(config, callback, errback) {
/* Send an IQ stanza with the room configuration. /* Send an IQ stanza with the groupchat configuration.
* *
* Parameters: * Parameters:
* (Array) config: The room configuration * (Array) config: The groupchat configuration
* (Function) callback: Callback upon succesful IQ response * (Function) callback: Callback upon succesful IQ response
* The first parameter passed in is IQ containing the * The first parameter passed in is IQ containing the
* room configuration. * groupchat configuration.
* The second is the response IQ from the server. * The second is the response IQ from the server.
* (Function) errback: Callback upon error IQ response * (Function) errback: Callback upon error IQ response
* The first parameter passed in is IQ containing the * The first parameter passed in is IQ containing the
* room configuration. * groupchat configuration.
* The second is the response IQ from the server. * The second is the response IQ from the server.
*/ */
const iq = $iq({ const iq = $iq({
...@@ -78329,7 +78341,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78329,7 +78341,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
setAffiliations(members) { setAffiliations(members) {
/* Send IQ stanzas to the server to modify the /* Send IQ stanzas to the server to modify the
* affiliations in this room. * affiliations in this groupchat.
* *
* See: http://xmpp.org/extensions/xep-0045.html#modifymember * See: http://xmpp.org/extensions/xep-0045.html#modifymember
* *
...@@ -78381,7 +78393,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78381,7 +78393,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
checkForReservedNick(callback, errback) { checkForReservedNick(callback, errback) {
/* Use service-discovery to ask the XMPP server whether /* Use service-discovery to ask the XMPP server whether
* this user has a reserved nickname for this room. * this user has a reserved nickname for this groupchat.
* If so, we'll use that, otherwise we render the nickname form. * If so, we'll use that, otherwise we render the nickname form.
* *
* Parameters: * Parameters:
...@@ -78518,7 +78530,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78518,7 +78530,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
onMessage(stanza) { onMessage(stanza) {
/* Handler for all MUC messages sent to this chat room. /* Handler for all MUC messages sent to this groupchat.
* *
* Parameters: * Parameters:
* (XMLElement) stanza: The message stanza. * (XMLElement) stanza: The message stanza.
...@@ -78596,14 +78608,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78596,14 +78608,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
/* Handles a received presence relating to the current /* Handles a received presence relating to the current
* user. * user.
* *
* For locked rooms (which are by definition "new"), the * For locked groupchats (which are by definition "new"), the
* room will either be auto-configured or created instantly * groupchat will either be auto-configured or created instantly
* (with default config) or a configuration room will be * (with default config) or a configuration groupchat will be
* rendered. * rendered.
* *
* If the room is not locked, then the room will be * If the groupchat is not locked, then the groupchat will be
* auto-configured only if applicable and if the current * auto-configured only if applicable and if the current
* user is the room's owner. * user is the groupchat's owner.
* *
* Parameters: * Parameters:
* (XMLElement) pres: The stanza * (XMLElement) pres: The stanza
...@@ -78619,11 +78631,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78619,11 +78631,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.saveConfiguration().then(this.getRoomFeatures.bind(this)); this.saveConfiguration().then(this.getRoomFeatures.bind(this));
} else { } else {
this.trigger('configurationNeeded'); this.trigger('configurationNeeded');
return; // We haven't yet entered the room, so bail here. return; // We haven't yet entered the groupchat, so bail here.
} }
} else if (!this.get('features_fetched')) { } else if (!this.get('features_fetched')) {
// The features for this room weren't fetched. // The features for this groupchat weren't fetched.
// That must mean it's a new room without locking // That must mean it's a new groupchat without locking
// (in which case Prosody doesn't send a 201 status), // (in which case Prosody doesn't send a 201 status),
// otherwise the features would have been fetched in // otherwise the features would have been fetched in
// the "initialize" method already. // the "initialize" method already.
...@@ -78814,7 +78826,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78814,7 +78826,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}); });
_converse.onDirectMUCInvitation = function (message) { _converse.onDirectMUCInvitation = function (message) {
/* A direct MUC invitation to join a room has been received /* A direct MUC invitation to join a groupchat has been received
* See XEP-0249: Direct MUC invitations. * See XEP-0249: Direct MUC invitations.
* *
* Parameters: * Parameters:
...@@ -78836,9 +78848,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78836,9 +78848,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
contact = contact ? contact.get('fullname') : Strophe.getNodeFromJid(from); contact = contact ? contact.get('fullname') : Strophe.getNodeFromJid(from);
if (!reason) { if (!reason) {
result = confirm(__("%1$s has invited you to join a chat room: %2$s", contact, room_jid)); result = confirm(__("%1$s has invited you to join a groupchat: %2$s", contact, room_jid));
} else { } else {
result = confirm(__('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"', contact, room_jid, reason)); result = confirm(__('%1$s has invited you to join a groupchat: %2$s, and left the following reason: "%3$s"', contact, room_jid, reason));
} }
} }
...@@ -78880,24 +78892,24 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78880,24 +78892,24 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}; };
function autoJoinRooms() { function autoJoinRooms() {
/* Automatically join chat rooms, based on the /* Automatically join groupchats, based on the
* "auto_join_rooms" configuration setting, which is an array * "auto_join_rooms" configuration setting, which is an array
* of strings (room JIDs) or objects (with room JID and other * of strings (groupchat JIDs) or objects (with groupchat JID and other
* settings). * settings).
*/ */
_.each(_converse.auto_join_rooms, function (room) { _.each(_converse.auto_join_rooms, function (groupchat) {
if (_converse.chatboxes.where({ if (_converse.chatboxes.where({
'jid': room 'jid': groupchat
}).length) { }).length) {
return; return;
} }
if (_.isString(room)) { if (_.isString(groupchat)) {
_converse.api.rooms.open(room); _converse.api.rooms.open(groupchat);
} else if (_.isObject(room)) { } else if (_.isObject(groupchat)) {
_converse.api.rooms.open(room.jid, room.nick); _converse.api.rooms.open(groupchat.jid, groupchat.nick);
} else { } else {
_converse.log('Invalid room criteria specified for "auto_join_rooms"', Strophe.LogLevel.ERROR); _converse.log('Invalid groupchat criteria specified for "auto_join_rooms"', Strophe.LogLevel.ERROR);
} }
}); });
...@@ -78905,7 +78917,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78905,7 +78917,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
} }
function disconnectChatRooms() { function disconnectChatRooms() {
/* When disconnecting, mark all chat rooms as /* When disconnecting, mark all groupchats as
* disconnected, so that they will be properly entered again * disconnected, so that they will be properly entered again
* when fetched from session storage. * when fetched from session storage.
*/ */
...@@ -78950,7 +78962,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -78950,7 +78962,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
/************************ END Event Handlers ************************/ /************************ END Event Handlers ************************/
/************************ BEGIN API ************************/ /************************ BEGIN API ************************/
// We extend the default converse.js API to add methods specific to MUC chat rooms. // We extend the default converse.js API to add methods specific to MUC groupchats.
_.extend(_converse.api, { _.extend(_converse.api, {
...@@ -84497,7 +84509,7 @@ __e(o.__('Name')) + ...@@ -84497,7 +84509,7 @@ __e(o.__('Name')) +
'</strong>: ' + '</strong>: ' +
__e(o.name) + __e(o.name) +
'</p>\n <p class="room-info"><strong>' + '</p>\n <p class="room-info"><strong>' +
__e(o.__('Room address (JID)')) + __e(o.__('Groupchat address (JID)')) +
'</strong>: ' + '</strong>: ' +
__e(o.jid) + __e(o.jid) +
'</p>\n <p class="room-info"><strong>' + '</p>\n <p class="room-info"><strong>' +
...@@ -84527,7 +84539,7 @@ __e(o.__('Features')) + ...@@ -84527,7 +84539,7 @@ __e(o.__('Features')) +
__p += '\n <li class="feature" ><span class="fa fa-lock"></span>' + __p += '\n <li class="feature" ><span class="fa fa-lock"></span>' +
__e( o.__('Password protected') ) + __e( o.__('Password protected') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room requires a password before entry') ) + __e( o.__('This groupchat requires a password before entry') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84535,7 +84547,7 @@ __p += '\n '; ...@@ -84535,7 +84547,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-unlock"></span>' + __p += '\n <li class="feature" ><span class="fa fa-unlock"></span>' +
__e( o.__('No password required') ) + __e( o.__('No password required') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room does not require a password upon entry') ) + __e( o.__('This groupchat does not require a password upon entry') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84543,7 +84555,7 @@ __p += '\n '; ...@@ -84543,7 +84555,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-eye-slash"></span>' + __p += '\n <li class="feature" ><span class="fa fa-eye-slash"></span>' +
__e( o.__('Hidden') ) + __e( o.__('Hidden') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room is not publicly searchable') ) + __e( o.__('This groupchat is not publicly searchable') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84551,7 +84563,7 @@ __p += '\n '; ...@@ -84551,7 +84563,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-eye"></span>' + __p += '\n <li class="feature" ><span class="fa fa-eye"></span>' +
__e( o.__('Public') ) + __e( o.__('Public') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room is publicly searchable') ) + __e( o.__('This groupchat is publicly searchable') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84559,7 +84571,7 @@ __p += '\n '; ...@@ -84559,7 +84571,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-address-book"></span>' + __p += '\n <li class="feature" ><span class="fa fa-address-book"></span>' +
__e( o.__('Members only') ) + __e( o.__('Members only') ) +
' - <em>' + ' - <em>' +
__e( o.__('this room is restricted to members only') ) + __e( o.__('This groupchat is restricted to members only') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84567,7 +84579,7 @@ __p += '\n '; ...@@ -84567,7 +84579,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-globe"></span>' + __p += '\n <li class="feature" ><span class="fa fa-globe"></span>' +
__e( o.__('Open') ) + __e( o.__('Open') ) +
' - <em>' + ' - <em>' +
__e( o.__('Anyone can join this room') ) + __e( o.__('Anyone can join this groupchat') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84575,7 +84587,7 @@ __p += '\n '; ...@@ -84575,7 +84587,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-save"></span>' + __p += '\n <li class="feature" ><span class="fa fa-save"></span>' +
__e( o.__('Persistent') ) + __e( o.__('Persistent') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room persists even if it\'s unoccupied') ) + __e( o.__('This groupchat persists even if it\'s unoccupied') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84583,7 +84595,7 @@ __p += '\n '; ...@@ -84583,7 +84595,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-snowflake-o"></span>' + __p += '\n <li class="feature" ><span class="fa fa-snowflake-o"></span>' +
__e( o.__('Temporary') ) + __e( o.__('Temporary') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room will disappear once the last person leaves') ) + __e( o.__('This groupchat will disappear once the last person leaves') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84591,7 +84603,7 @@ __p += '\n '; ...@@ -84591,7 +84603,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-id-card"></span>' + __p += '\n <li class="feature" ><span class="fa fa-id-card"></span>' +
__e( o.__('Not anonymous') ) + __e( o.__('Not anonymous') ) +
' - <em>' + ' - <em>' +
__e( o.__('All other room occupants can see your XMPP username') ) + __e( o.__('All other groupchat participants can see your XMPP username') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84607,7 +84619,7 @@ __p += '\n '; ...@@ -84607,7 +84619,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-gavel"></span>' + __p += '\n <li class="feature" ><span class="fa fa-gavel"></span>' +
__e( o.__('Moderated') ) + __e( o.__('Moderated') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room is being moderated') ) + __e( o.__('This groupchat is being moderated') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
...@@ -84615,7 +84627,7 @@ __p += '\n '; ...@@ -84615,7 +84627,7 @@ __p += '\n ';
__p += '\n <li class="feature" ><span class="fa fa-info-circle"></span>' + __p += '\n <li class="feature" ><span class="fa fa-info-circle"></span>' +
__e( o.__('Not moderated') ) + __e( o.__('Not moderated') ) +
' - <em>' + ' - <em>' +
__e( o.__('This room is not being moderated') ) + __e( o.__('This groupchat is not being moderated') ) +
'</em></li>\n '; '</em></li>\n ';
} ; } ;
__p += '\n '; __p += '\n ';
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