Commit 04e948ad authored by JC Brand's avatar JC Brand

Fix build error by setting dependency

parent 2515001a
...@@ -49664,65 +49664,69 @@ return __p ...@@ -49664,65 +49664,69 @@ return __p
// //
// Copyright (c) 2013-2018, the Converse.js developers // Copyright (c) 2013-2018, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2) // Licensed under the Mozilla Public License (MPLv2)
(function (root, factory) { (function (root, factory) {
define('converse-caps',["converse-core"], factory); define('converse-caps',["converse-core"], factory);
}(this, function (converse) { })(this, function (converse) {
var _converse$env = converse.env,
Strophe = _converse$env.Strophe,
$build = _converse$env.$build,
_ = _converse$env._,
b64_sha1 = _converse$env.b64_sha1;
Strophe.addNamespace('CAPS', "http://jabber.org/protocol/caps");
const { Strophe, $build, _, b64_sha1 } = converse.env; function propertySort(array, property) {
return array.sort(function (a, b) {
return a[property] > b[property] ? -1 : 1;
});
}
Strophe.addNamespace('CAPS', "http://jabber.org/protocol/caps"); function generateVerificationString(_converse) {
var identities = _converse.api.disco.own.identities.get(),
features = _converse.api.disco.own.features.get();
function propertySort (array, property) { if (identities.length > 1) {
return array.sort((a, b) => { return a[property] > b[property] ? -1 : 1 }); propertySort(identities, "category");
propertySort(identities, "type");
propertySort(identities, "lang");
} }
function generateVerificationString (_converse) { var S = _.reduce(identities, function (result, id) {
const identities = _converse.api.disco.own.identities.get(), return "".concat(result).concat(id.category, "/").concat(id.type, "/").concat(_.get(id, 'lang', ''), "/").concat(id.name, "<");
features = _converse.api.disco.own.features.get(); }, "");
if (identities.length > 1) { features.sort();
propertySort(identities, "category"); S = _.reduce(features, function (result, feature) {
propertySort(identities, "type"); return "".concat(result).concat(feature, "<");
propertySort(identities, "lang"); }, S);
} return b64_sha1(S);
}
let S = _.reduce(
identities,
(result, id) => `${result}${id.category}/${id.type}/${_.get(id, 'lang', '')}/${id.name}<`,
"");
features.sort();
S = _.reduce(features, (result, feature) => `${result}${feature}<`, S);
return b64_sha1(S);
}
function createCapsNode (_converse) { function createCapsNode(_converse) {
return $build("c", { return $build("c", {
'xmlns': Strophe.NS.CAPS, 'xmlns': Strophe.NS.CAPS,
'hash': "sha-1", 'hash': "sha-1",
'node': "https://conversejs.org", 'node': "https://conversejs.org",
'ver': generateVerificationString(_converse) 'ver': generateVerificationString(_converse)
}).nodeTree; }).nodeTree;
} }
converse.plugins.add('converse-caps', { converse.plugins.add('converse-caps', {
overrides: {
// Overrides mentioned here will be picked up by converse.js's
// plugin architecture they will replace existing methods on the
// relevant objects or classes.
XMPPStatus: {
constructPresence: function constructPresence() {
var presence = this.__super__.constructPresence.apply(this, arguments);
overrides: { presence.root().cnode(createCapsNode(this.__super__._converse));
// Overrides mentioned here will be picked up by converse.js's return presence;
// plugin architecture they will replace existing methods on the
// relevant objects or classes.
XMPPStatus: {
constructPresence () {
const presence = this.__super__.constructPresence.apply(this, arguments);
presence.root().cnode(createCapsNode(this.__super__._converse));
return presence;
}
}
} }
}); }
})); }
});
});
//# sourceMappingURL=converse-caps.js.map;
// Native Javascript for Bootstrap 4 v2.0.22 | © dnp_theme | MIT-License // Native Javascript for Bootstrap 4 v2.0.22 | © dnp_theme | MIT-License
(function (root, factory) { (function (root, factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
...@@ -53800,7 +53804,7 @@ return __p ...@@ -53800,7 +53804,7 @@ return __p
_ = _converse$env._; _ = _converse$env._;
var u = converse.env.utils; var u = converse.env.utils;
converse.plugins.add('converse-chatboxes', { converse.plugins.add('converse-chatboxes', {
dependencies: ["converse-vcard"], dependencies: ["converse-roster", "converse-vcard"],
overrides: { overrides: {
// Overrides mentioned here will be picked up by converse.js's // Overrides mentioned here will be picked up by converse.js's
// plugin architecture they will replace existing methods on the // plugin architecture they will replace existing methods on the
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
paths: { paths: {
"backbone.vdomview": "builds/backbone.vdomview", "backbone.vdomview": "builds/backbone.vdomview",
"converse-bookmarks": "builds/converse-bookmarks", "converse-bookmarks": "builds/converse-bookmarks",
"converse-caps": "builds/converse-caps",
"converse-chatboxes": "builds/converse-chatboxes", "converse-chatboxes": "builds/converse-chatboxes",
"converse-chatview": "builds/converse-chatview", "converse-chatview": "builds/converse-chatview",
"converse-controlbox": "builds/converse-controlbox", "converse-controlbox": "builds/converse-controlbox",
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
converse.plugins.add('converse-chatboxes', { converse.plugins.add('converse-chatboxes', {
dependencies: ["converse-vcard"], dependencies: ["converse-roster", "converse-vcard"],
overrides: { overrides: {
// Overrides mentioned here will be picked up by converse.js's // Overrides mentioned here will be picked up by converse.js's
......
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