|
@@ -9,7 +9,7 @@
|
|
(function (root, factory) {
|
|
(function (root, factory) {
|
|
define("converse-core", [
|
|
define("converse-core", [
|
|
"jquery",
|
|
"jquery",
|
|
- "underscore",
|
|
|
|
|
|
+ "lodash",
|
|
"polyfill",
|
|
"polyfill",
|
|
"utils",
|
|
"utils",
|
|
"moment_with_locales",
|
|
"moment_with_locales",
|
|
@@ -34,7 +34,7 @@
|
|
Strophe = Strophe.Strophe;
|
|
Strophe = Strophe.Strophe;
|
|
|
|
|
|
// Use Mustache style syntax for variable interpolation
|
|
// Use Mustache style syntax for variable interpolation
|
|
- /* Configuration of underscore templates (this config is distinct to the
|
|
|
|
|
|
+ /* Configuration of Lodash templates (this config is distinct to the
|
|
* config of requirejs-tpl in main.js). This one is for normal inline templates.
|
|
* config of requirejs-tpl in main.js). This one is for normal inline templates.
|
|
*/
|
|
*/
|
|
_.templateSettings = {
|
|
_.templateSettings = {
|
|
@@ -64,7 +64,7 @@
|
|
},
|
|
},
|
|
|
|
|
|
on: function (evt, handler, context) {
|
|
on: function (evt, handler, context) {
|
|
- if (_.contains(['ready', 'initialized'], evt)) {
|
|
|
|
|
|
+ if (_.includes(['ready', 'initialized'], evt)) {
|
|
converse.log('Warning: The "'+evt+'" event has been deprecated and will be removed, please use "connected".');
|
|
converse.log('Warning: The "'+evt+'" event has been deprecated and will be removed, please use "connected".');
|
|
}
|
|
}
|
|
if (context) {
|
|
if (context) {
|
|
@@ -246,9 +246,9 @@
|
|
xhr_custom_status: false,
|
|
xhr_custom_status: false,
|
|
xhr_custom_status_url: '',
|
|
xhr_custom_status_url: '',
|
|
};
|
|
};
|
|
- _.extend(this, this.default_settings);
|
|
|
|
|
|
+ _.assignIn(this, this.default_settings);
|
|
// Allow only whitelisted configuration attributes to be overwritten
|
|
// Allow only whitelisted configuration attributes to be overwritten
|
|
- _.extend(this, _.pick(settings, Object.keys(this.default_settings)));
|
|
|
|
|
|
+ _.assignIn(this, _.pick(settings, Object.keys(this.default_settings)));
|
|
|
|
|
|
// BBB
|
|
// BBB
|
|
if (this.prebind === true) { this.authentication = converse.PREBIND; }
|
|
if (this.prebind === true) { this.authentication = converse.PREBIND; }
|
|
@@ -753,7 +753,7 @@
|
|
var bare_jid = Strophe.getBareJidFromJid(jid);
|
|
var bare_jid = Strophe.getBareJidFromJid(jid);
|
|
var resource = Strophe.getResourceFromJid(jid);
|
|
var resource = Strophe.getResourceFromJid(jid);
|
|
attributes.jid = bare_jid;
|
|
attributes.jid = bare_jid;
|
|
- this.set(_.extend({
|
|
|
|
|
|
+ this.set(_.assignIn({
|
|
'id': bare_jid,
|
|
'id': bare_jid,
|
|
'jid': bare_jid,
|
|
'jid': bare_jid,
|
|
'fullname': bare_jid,
|
|
'fullname': bare_jid,
|
|
@@ -985,7 +985,7 @@
|
|
name = _.isEmpty(name)? jid: name;
|
|
name = _.isEmpty(name)? jid: name;
|
|
this.sendContactAddIQ(jid, name, groups,
|
|
this.sendContactAddIQ(jid, name, groups,
|
|
function (iq) {
|
|
function (iq) {
|
|
- var contact = this.create(_.extend({
|
|
|
|
|
|
+ var contact = this.create(_.assignIn({
|
|
ask: undefined,
|
|
ask: undefined,
|
|
fullname: name,
|
|
fullname: name,
|
|
groups: groups,
|
|
groups: groups,
|
|
@@ -1246,7 +1246,7 @@
|
|
|
|
|
|
this.RosterGroup = Backbone.Model.extend({
|
|
this.RosterGroup = Backbone.Model.extend({
|
|
initialize: function (attributes, options) {
|
|
initialize: function (attributes, options) {
|
|
- this.set(_.extend({
|
|
|
|
|
|
+ this.set(_.assignIn({
|
|
description: DESC_GROUP_TOGGLE,
|
|
description: DESC_GROUP_TOGGLE,
|
|
state: converse.OPENED
|
|
state: converse.OPENED
|
|
}, attributes));
|
|
}, attributes));
|
|
@@ -1515,7 +1515,7 @@
|
|
' and allow_non_roster_messaging is set to false', 'error');
|
|
' and allow_non_roster_messaging is set to false', 'error');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- chatbox = this.create(_.extend({
|
|
|
|
|
|
+ chatbox = this.create(_.assignIn({
|
|
'id': bare_jid,
|
|
'id': bare_jid,
|
|
'jid': bare_jid,
|
|
'jid': bare_jid,
|
|
'fullname': jid,
|
|
'fullname': jid,
|
|
@@ -1928,7 +1928,7 @@
|
|
} else if (this.bosh_service_url) {
|
|
} else if (this.bosh_service_url) {
|
|
this.connection = new Strophe.Connection(
|
|
this.connection = new Strophe.Connection(
|
|
this.bosh_service_url,
|
|
this.bosh_service_url,
|
|
- _.extend(this.connection_options, {'keepalive': this.keepalive})
|
|
|
|
|
|
+ _.assignIn(this.connection_options, {'keepalive': this.keepalive})
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
throw new Error("initConnection: this browser does not support websockets and bosh_service_url wasn't specified.");
|
|
throw new Error("initConnection: this browser does not support websockets and bosh_service_url wasn't specified.");
|