2020-01-26 16:21:20 +01:00
|
|
|
/**
|
|
|
|
* @description Converse.js (A browser based XMPP chat client)
|
|
|
|
* @copyright 2020, The Converse developers
|
|
|
|
* @license Mozilla Public License (MPLv2)
|
|
|
|
*/
|
2019-10-06 12:48:05 +02:00
|
|
|
|
2018-10-23 15:32:08 +02:00
|
|
|
/* START: Removable components
|
|
|
|
* --------------------
|
|
|
|
* Any of the following components may be removed if they're not needed.
|
|
|
|
*/
|
2019-05-29 17:40:16 +02:00
|
|
|
import "@converse/headless/headless";
|
2020-09-10 07:33:00 +02:00
|
|
|
import "i18n";
|
2020-07-01 21:45:18 +02:00
|
|
|
import "converse-registry";
|
2018-10-23 15:32:08 +02:00
|
|
|
import "converse-autocomplete";
|
2019-05-21 11:12:34 +02:00
|
|
|
import "converse-bookmark-views"; // Views for XEP-0048 Bookmarks
|
2018-10-23 15:32:08 +02:00
|
|
|
import "converse-chatview"; // Renders standalone chat boxes for single user chat
|
|
|
|
import "converse-controlbox"; // The control box
|
|
|
|
import "converse-dragresize"; // Allows chat boxes to be resized by dragging them
|
|
|
|
import "converse-fullscreen";
|
2019-03-15 10:00:08 +01:00
|
|
|
import "converse-mam-views";
|
2018-10-23 15:32:08 +02:00
|
|
|
import "converse-minimize"; // Allows chat boxes to be minimized
|
|
|
|
import "converse-muc-views"; // Views related to MUC
|
2019-11-01 16:04:55 +01:00
|
|
|
import "converse-headlines-view";
|
2018-10-23 15:32:08 +02:00
|
|
|
import "converse-notification"; // HTML5 Notifications
|
|
|
|
import "converse-omemo";
|
2019-08-05 11:07:38 +02:00
|
|
|
import "converse-profile";
|
2019-08-16 10:18:35 +02:00
|
|
|
import "converse-push"; // XEP-0357 Push Notifications
|
2018-10-23 15:32:08 +02:00
|
|
|
import "converse-register"; // XEP-0077 In-band registration
|
|
|
|
import "converse-roomslist"; // Show currently open chat rooms
|
2018-10-23 15:40:06 +02:00
|
|
|
import "converse-rosterview";
|
2018-12-04 12:52:25 +01:00
|
|
|
import "converse-singleton";
|
|
|
|
import "converse-uniview";
|
2020-08-26 16:07:59 +02:00
|
|
|
import "./components/converse.js";
|
2018-10-23 15:32:08 +02:00
|
|
|
/* END: Removable components */
|
|
|
|
|
2019-08-23 13:19:05 +02:00
|
|
|
import "../sass/converse.scss";
|
|
|
|
|
2020-04-23 13:22:31 +02:00
|
|
|
import { converse } from "@converse/headless/converse-core";
|
2018-10-26 16:09:45 +02:00
|
|
|
|
|
|
|
const WHITELISTED_PLUGINS = [
|
|
|
|
'converse-autocomplete',
|
2019-05-21 11:12:34 +02:00
|
|
|
'converse-bookmark-views',
|
2018-10-26 16:09:45 +02:00
|
|
|
'converse-chatboxviews',
|
|
|
|
'converse-chatview',
|
|
|
|
'converse-controlbox',
|
|
|
|
'converse-dragresize',
|
|
|
|
'converse-fullscreen',
|
2019-03-15 10:00:08 +01:00
|
|
|
'converse-mam-views',
|
2018-10-26 16:09:45 +02:00
|
|
|
'converse-minimize',
|
|
|
|
'converse-modal',
|
|
|
|
'converse-muc-views',
|
2019-11-01 16:04:55 +01:00
|
|
|
'converse-headlines-view',
|
2018-10-26 16:09:45 +02:00
|
|
|
'converse-notification',
|
|
|
|
'converse-omemo',
|
|
|
|
'converse-profile',
|
|
|
|
'converse-push',
|
|
|
|
'converse-register',
|
|
|
|
'converse-roomslist',
|
|
|
|
'converse-rosterview',
|
2018-12-04 12:52:25 +01:00
|
|
|
'converse-singleton',
|
|
|
|
'converse-uniview'
|
2018-10-26 16:09:45 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
const initialize = converse.initialize;
|
|
|
|
|
|
|
|
converse.initialize = function (settings, callback) {
|
2019-05-14 11:38:41 +02:00
|
|
|
if (Array.isArray(settings.whitelisted_plugins)) {
|
2018-10-26 16:09:45 +02:00
|
|
|
settings.whitelisted_plugins = settings.whitelisted_plugins.concat(WHITELISTED_PLUGINS);
|
|
|
|
} else {
|
|
|
|
settings.whitelisted_plugins = WHITELISTED_PLUGINS;
|
|
|
|
}
|
|
|
|
return initialize(settings, callback);
|
|
|
|
}
|
|
|
|
|
2018-10-23 15:32:08 +02:00
|
|
|
export default converse;
|