2020-01-26 16:21:20 +01:00
|
|
|
/**
|
|
|
|
* @description Converse.js (A browser based XMPP chat client)
|
2021-07-15 18:45:16 +02:00
|
|
|
* @copyright 2021, The Converse developers
|
2020-01-26 16:21:20 +01:00
|
|
|
* @license Mozilla Public License (MPLv2)
|
|
|
|
*/
|
2019-10-06 12:48:05 +02:00
|
|
|
|
2020-12-03 13:40:30 +01:00
|
|
|
import "@converse/headless/headless";
|
2022-01-27 12:07:52 +01:00
|
|
|
import "./i18n/index.js";
|
2020-12-03 13:40:30 +01:00
|
|
|
import "shared/registry.js";
|
2021-07-15 18:45:16 +02:00
|
|
|
import { CustomElement } from 'shared/components/element';
|
|
|
|
import { VIEW_PLUGINS } from './shared/constants.js';
|
|
|
|
import { _converse, converse } from "@converse/headless/core";
|
2020-12-03 13:40:30 +01:00
|
|
|
|
2021-03-19 11:28:35 +01:00
|
|
|
import 'shared/styles/index.scss';
|
|
|
|
|
2021-07-15 18:45:16 +02:00
|
|
|
/* START: Removable plugins
|
|
|
|
* ------------------------
|
|
|
|
* Any of the following plugin imports may be removed if the plugin is not needed
|
2018-10-23 15:32:08 +02:00
|
|
|
*/
|
2021-07-15 18:45:16 +02:00
|
|
|
import "./plugins/bookmark-views/index.js"; // Views for XEP-0048 Bookmarks
|
2020-12-10 11:08:17 +01:00
|
|
|
import "./plugins/chatview/index.js"; // Renders standalone chat boxes for single user chat
|
2020-12-04 22:05:43 +01:00
|
|
|
import "./plugins/controlbox/index.js"; // The control box
|
2020-12-29 12:38:17 +01:00
|
|
|
import "./plugins/dragresize/index.js"; // Allows chat boxes to be resized by dragging them
|
2021-03-19 12:05:43 +01:00
|
|
|
import "./plugins/fullscreen/index.js";
|
2020-12-08 12:54:14 +01:00
|
|
|
import "./plugins/headlines-view/index.js";
|
2021-04-11 21:10:21 +02:00
|
|
|
import "./plugins/mam-views/index.js";
|
2021-07-15 18:45:16 +02:00
|
|
|
import "./plugins/minimize/index.js"; // Allows chat boxes to be minimized
|
2020-12-10 11:08:17 +01:00
|
|
|
import "./plugins/muc-views/index.js"; // Views related to MUC
|
2021-02-01 14:38:42 +01:00
|
|
|
import "./plugins/notifications/index.js";
|
2021-04-11 19:51:58 +02:00
|
|
|
import "./plugins/omemo/index.js";
|
2021-01-22 15:45:44 +01:00
|
|
|
import "./plugins/profile/index.js";
|
2021-07-19 16:25:37 +02:00
|
|
|
import "./plugins/push/index.js"; // XEP-0357 Push Notifications
|
2020-12-29 10:36:59 +01:00
|
|
|
import "./plugins/register/index.js"; // XEP-0077 In-band registration
|
2020-12-16 14:05:34 +01:00
|
|
|
import "./plugins/roomslist/index.js"; // Show currently open chat rooms
|
2020-12-08 12:54:14 +01:00
|
|
|
import "./plugins/rootview/index.js";
|
2020-12-28 18:41:38 +01:00
|
|
|
import "./plugins/rosterview/index.js";
|
2021-11-24 21:52:40 +01:00
|
|
|
import "./plugins/singleton/index.js";
|
2018-10-23 15:32:08 +02:00
|
|
|
/* END: Removable components */
|
|
|
|
|
2021-02-24 07:36:10 +01:00
|
|
|
|
|
|
|
_converse.CustomElement = CustomElement;
|
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)) {
|
2021-07-15 18:45:16 +02:00
|
|
|
settings.whitelisted_plugins = settings.whitelisted_plugins.concat(VIEW_PLUGINS);
|
2018-10-26 16:09:45 +02:00
|
|
|
} else {
|
2021-07-15 18:45:16 +02:00
|
|
|
settings.whitelisted_plugins = VIEW_PLUGINS;
|
2018-10-26 16:09:45 +02:00
|
|
|
}
|
|
|
|
return initialize(settings, callback);
|
|
|
|
}
|
|
|
|
|
2018-10-23 15:32:08 +02:00
|
|
|
export default converse;
|