ref(strophe): Remove and cleanup all strophe related code.
Everything strophe related is now handled in lib-jitsi-meet project.
This commit is contained in:
parent
6890414bad
commit
a4e7f3d992
2
app.js
2
app.js
@ -3,8 +3,6 @@
|
|||||||
import 'jquery';
|
import 'jquery';
|
||||||
import 'jquery-contextmenu';
|
import 'jquery-contextmenu';
|
||||||
import 'jquery-ui';
|
import 'jquery-ui';
|
||||||
import 'strophe';
|
|
||||||
import 'strophe-disco';
|
|
||||||
import 'jQuery-Impromptu';
|
import 'jQuery-Impromptu';
|
||||||
import 'autosize';
|
import 'autosize';
|
||||||
|
|
||||||
|
|||||||
@ -49,6 +49,7 @@
|
|||||||
"jwt-decode": "2.2.0",
|
"jwt-decode": "2.2.0",
|
||||||
"lib-jitsi-meet": "jitsi/lib-jitsi-meet",
|
"lib-jitsi-meet": "jitsi/lib-jitsi-meet",
|
||||||
"lodash": "4.17.4",
|
"lodash": "4.17.4",
|
||||||
|
"js-md5": "0.6.1",
|
||||||
"nuclear-js": "1.4.0",
|
"nuclear-js": "1.4.0",
|
||||||
"postis": "2.2.0",
|
"postis": "2.2.0",
|
||||||
"prop-types": "15.6.0",
|
"prop-types": "15.6.0",
|
||||||
@ -69,8 +70,6 @@
|
|||||||
"react-redux": "5.0.6",
|
"react-redux": "5.0.6",
|
||||||
"redux": "3.7.2",
|
"redux": "3.7.2",
|
||||||
"redux-thunk": "2.2.0",
|
"redux-thunk": "2.2.0",
|
||||||
"strophe": "1.2.4",
|
|
||||||
"strophejs-plugins": "0.0.7",
|
|
||||||
"styled-components": "1.3.0",
|
"styled-components": "1.3.0",
|
||||||
"url-polyfill": "github:github/url-polyfill",
|
"url-polyfill": "github:github/url-polyfill",
|
||||||
"uuid": "3.1.0",
|
"uuid": "3.1.0",
|
||||||
@ -120,7 +119,6 @@
|
|||||||
"aui-experimental": "@atlassian/aui/lib/js/aui-experimental.js",
|
"aui-experimental": "@atlassian/aui/lib/js/aui-experimental.js",
|
||||||
"aui-experimental-css": "./node_modules/@atlassian/aui/dist/aui/css/aui-experimental.min.css",
|
"aui-experimental-css": "./node_modules/@atlassian/aui/dist/aui/css/aui-experimental.min.css",
|
||||||
"autosize": "./node_modules/autosize/build/jquery.autosize.js",
|
"autosize": "./node_modules/autosize/build/jquery.autosize.js",
|
||||||
"jQuery-Impromptu": "jQuery-Impromptu/src/jquery-impromptu.js",
|
"jQuery-Impromptu": "jQuery-Impromptu/src/jquery-impromptu.js"
|
||||||
"strophe-disco": "./node_modules/strophejs-plugins/disco/strophe.disco.js"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import './native';
|
import './native';
|
||||||
|
|
||||||
// The library lib-jitsi-meet (externally) depends on the libraries jQuery and
|
// The library lib-jitsi-meet (externally) depends on the libraries jQuery
|
||||||
// Strophe
|
|
||||||
(global => {
|
(global => {
|
||||||
// jQuery
|
// jQuery
|
||||||
if (typeof global.$ === 'undefined') {
|
if (typeof global.$ === 'undefined') {
|
||||||
@ -10,13 +9,6 @@ import './native';
|
|||||||
jQuery(global);
|
jQuery(global);
|
||||||
global.$ = jQuery;
|
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
|
})(global || window || this); // eslint-disable-line no-invalid-this
|
||||||
|
|
||||||
// Re-export JitsiMeetJS from the library lib-jitsi-meet to (the other features
|
// Re-export JitsiMeetJS from the library lib-jitsi-meet to (the other features
|
||||||
|
|||||||
@ -143,24 +143,10 @@ function _visitNode(node, callback) {
|
|||||||
document.cookie = '';
|
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
|
// Element.querySelector
|
||||||
//
|
//
|
||||||
// Required by:
|
// Required by:
|
||||||
// - strophejs-plugins/caps/strophe.caps.jsonly.js
|
// - lib-jitsi-meet/modules/xmpp
|
||||||
const elementPrototype
|
const elementPrototype
|
||||||
= Object.getPrototypeOf(document.documentElement);
|
= Object.getPrototypeOf(document.documentElement);
|
||||||
|
|
||||||
@ -212,6 +198,7 @@ function _visitNode(node, callback) {
|
|||||||
// FIXME There is a weird infinite loop related to console.log and
|
// 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
|
// Document and/or Element at the time of this writing. Work around it
|
||||||
// by patching Node and/or overriding console.log.
|
// by patching Node and/or overriding console.log.
|
||||||
|
const documentPrototype = Object.getPrototypeOf(document);
|
||||||
const nodePrototype
|
const nodePrototype
|
||||||
= _getCommonPrototype(documentPrototype, elementPrototype);
|
= _getCommonPrototype(documentPrototype, elementPrototype);
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
// @flow
|
// @flow
|
||||||
|
import md5 from 'js-md5';
|
||||||
|
|
||||||
import { toState } from '../redux';
|
import { toState } from '../redux';
|
||||||
|
|
||||||
@ -6,7 +7,6 @@ import { DEFAULT_AVATAR_RELATIVE_PATH } from './constants';
|
|||||||
|
|
||||||
declare var config: Object;
|
declare var config: Object;
|
||||||
declare var interfaceConfig: Object;
|
declare var interfaceConfig: Object;
|
||||||
declare var MD5: Object;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the URL of the image for the avatar of a specific participant.
|
* 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -24,7 +24,6 @@ const plugins = [
|
|||||||
minimize
|
minimize
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
const strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
|
|
||||||
|
|
||||||
if (minimize) {
|
if (minimize) {
|
||||||
// XXX Webpack's command line argument -p is not enough. Further
|
// XXX Webpack's command line argument -p is not enough. Further
|
||||||
@ -92,12 +91,6 @@ const config = {
|
|||||||
|
|
||||||
loader: 'expose-loader?$!expose-loader?jQuery',
|
loader: 'expose-loader?$!expose-loader?jQuery',
|
||||||
test: /\/node_modules\/jquery\/.*\.js$/
|
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.
|
// Set scope to window for URL polyfill.
|
||||||
|
|
||||||
@ -122,14 +115,7 @@ const config = {
|
|||||||
name: '[path][name].[ext]'
|
name: '[path][name].[ext]'
|
||||||
},
|
},
|
||||||
test: /\.(gif|png|svg)$/
|
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: {
|
node: {
|
||||||
// Allow the use of the real filename of the module being executed. By
|
// Allow the use of the real filename of the module being executed. By
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user