Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

ref(strophe): Remove and cleanup all strophe related code.

hristoterezova4e7f3d99289
diff --git a/app.js b/app.js
index 51cd2cc9ed..d862b419bf 100644
--- a/app.js
+++ b/app.js
@@ -3,8 +3,6 @@
import 'jquery';
import 'jquery-contextmenu';
import 'jquery-ui';
-import 'strophe';
-import 'strophe-disco';
import 'jQuery-Impromptu';
import 'autosize';
diff --git a/package.json b/package.json
index ab97650ee7..bba4e90c74 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "jitsi/lib-jitsi-meet",
"lodash": "4.17.4",
+ "js-md5": "0.6.1",
"nuclear-js": "1.4.0",
"postis": "2.2.0",
"prop-types": "15.6.0",
@@ -69,8 +70,6 @@
"react-redux": "5.0.6",
"redux": "3.7.2",
"redux-thunk": "2.2.0",
- "strophe": "1.2.4",
- "strophejs-plugins": "0.0.7",
"styled-components": "1.3.0",
"url-polyfill": "github:github/url-polyfill",
"uuid": "3.1.0",
@@ -120,7 +119,6 @@
"aui-experimental": "@atlassian/aui/lib/js/aui-experimental.js",
"aui-experimental-css": "./node_modules/@atlassian/aui/dist/aui/css/aui-experimental.min.css",
"autosize": "./node_modules/autosize/build/jquery.autosize.js",
- "jQuery-Impromptu": "jQuery-Impromptu/src/jquery-impromptu.js",
- "strophe-disco": "./node_modules/strophejs-plugins/disco/strophe.disco.js"
+ "jQuery-Impromptu": "jQuery-Impromptu/src/jquery-impromptu.js"
}
}
diff --git a/react/features/base/lib-jitsi-meet/_.native.js b/react/features/base/lib-jitsi-meet/_.native.js
index 0d3c2d3f86..8fd47814a3 100644
--- a/react/features/base/lib-jitsi-meet/_.native.js
+++ b/react/features/base/lib-jitsi-meet/_.native.js
@@ -1,7 +1,6 @@
import './native';
-// The library lib-jitsi-meet (externally) depends on the libraries jQuery and
-// Strophe
+// The library lib-jitsi-meet (externally) depends on the libraries jQuery
(global => {
// jQuery
if (typeof global.$ === 'undefined') {
@@ -10,13 +9,6 @@ import './native';
jQuery(global);
global.$ = jQuery;
}
-
- // Strophe
- if (typeof global.Strophe === 'undefined') {
- require('strophe');
- require('strophejs-plugins/disco/strophe.disco');
- require('strophejs-plugins/caps/strophe.caps.jsonly');
- }
})(global || window || this); // eslint-disable-line no-invalid-this
// Re-export JitsiMeetJS from the library lib-jitsi-meet to (the other features
diff --git a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
index 13f01a2878..3498120159 100644
--- a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
+++ b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
@@ -143,24 +143,10 @@ function _visitNode(node, callback) {
document.cookie = '';
}
- // Document.querySelector
- //
- // Required by:
- // - strophejs-plugins/caps/strophe.caps.jsonly.js
- const documentPrototype = Object.getPrototypeOf(document);
-
- if (documentPrototype) {
- if (typeof documentPrototype.querySelector === 'undefined') {
- documentPrototype.querySelector = function(selectors) {
- return _querySelector(this.elementNode, selectors);
- };
- }
- }
-
// Element.querySelector
//
// Required by:
- // - strophejs-plugins/caps/strophe.caps.jsonly.js
+ // - lib-jitsi-meet/modules/xmpp
const elementPrototype
= Object.getPrototypeOf(document.documentElement);
@@ -212,6 +198,7 @@ function _visitNode(node, callback) {
// FIXME There is a weird infinite loop related to console.log and
// Document and/or Element at the time of this writing. Work around it
// by patching Node and/or overriding console.log.
+ const documentPrototype = Object.getPrototypeOf(document);
const nodePrototype
= _getCommonPrototype(documentPrototype, elementPrototype);
diff --git a/react/features/base/participants/functions.js b/react/features/base/participants/functions.js
index 7c3118ad31..7fd5391045 100644
--- a/react/features/base/participants/functions.js
+++ b/react/features/base/participants/functions.js
@@ -1,4 +1,5 @@
// @flow
+import md5 from 'js-md5';
import { toState } from '../redux';
@@ -6,7 +7,6 @@ import { DEFAULT_AVATAR_RELATIVE_PATH } from './constants';
declare var config: Object;
declare var interfaceConfig: Object;
-declare var MD5: Object;
/**
* Returns the URL of the image for the avatar of a specific participant.
@@ -71,7 +71,7 @@ export function getAvatarURL({ avatarID, avatarURL, email, id }: {
}
}
- return urlPrefix + MD5.hexdigest(key.trim().toLowerCase()) + urlSuffix;
+ return urlPrefix + md5.hex(key.trim().toLowerCase()) + urlSuffix;
}
/**
diff --git a/webpack.config.js b/webpack.config.js
index b93db14103..ec63182ef7 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -24,7 +24,6 @@ const plugins = [
minimize
})
];
-const strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
if (minimize) {
// XXX Webpack's command line argument -p is not enough. Further
@@ -92,12 +91,6 @@ const config = {
loader: 'expose-loader?$!expose-loader?jQuery',
test: /\/node_modules\/jquery\/.*\.js$/
- }, {
- // Disable AMD for the Strophe.js library or its imports will fail
- // at runtime.
-
- loader: 'imports-loader?define=>false&this=>window',
- test: strophe
}, {
// Set scope to window for URL polyfill.
@@ -122,14 +115,7 @@ const config = {
name: '[path][name].[ext]'
},
test: /\.(gif|png|svg)$/
- } ],
- noParse: [
-
- // Do not parse the files of the Strophe.js library or at least
- // parts of the properties of the Strophe global variable will be
- // missing and strophejs-plugins will fail at runtime.
- strophe
- ]
+ } ]
},
node: {
// Allow the use of the real filename of the module being executed. By