Преглед изворни кода

Merge pull request #2079 from jitsi/update_strophe

ref(strophe): Remove and cleanup all strophe related code.
master
Saúl Ibarra Corretgé пре 8 година
родитељ
комит
f1cc057bde

+ 0
- 2
app.js Прегледај датотеку

3
 import 'jquery';
3
 import 'jquery';
4
 import 'jquery-contextmenu';
4
 import 'jquery-contextmenu';
5
 import 'jquery-ui';
5
 import 'jquery-ui';
6
-import 'strophe';
7
-import 'strophe-disco';
8
 import 'jQuery-Impromptu';
6
 import 'jQuery-Impromptu';
9
 import 'autosize';
7
 import 'autosize';
10
 
8
 

+ 2
- 4
package.json Прегледај датотеку

49
     "jwt-decode": "2.2.0",
49
     "jwt-decode": "2.2.0",
50
     "lib-jitsi-meet": "jitsi/lib-jitsi-meet",
50
     "lib-jitsi-meet": "jitsi/lib-jitsi-meet",
51
     "lodash": "4.17.4",
51
     "lodash": "4.17.4",
52
+    "js-md5": "0.6.1",
52
     "nuclear-js": "1.4.0",
53
     "nuclear-js": "1.4.0",
53
     "postis": "2.2.0",
54
     "postis": "2.2.0",
54
     "prop-types": "15.6.0",
55
     "prop-types": "15.6.0",
69
     "react-redux": "5.0.6",
70
     "react-redux": "5.0.6",
70
     "redux": "3.7.2",
71
     "redux": "3.7.2",
71
     "redux-thunk": "2.2.0",
72
     "redux-thunk": "2.2.0",
72
-    "strophe": "1.2.4",
73
-    "strophejs-plugins": "0.0.7",
74
     "styled-components": "1.3.0",
73
     "styled-components": "1.3.0",
75
     "url-polyfill": "github:github/url-polyfill",
74
     "url-polyfill": "github:github/url-polyfill",
76
     "uuid": "3.1.0",
75
     "uuid": "3.1.0",
120
     "aui-experimental": "@atlassian/aui/lib/js/aui-experimental.js",
119
     "aui-experimental": "@atlassian/aui/lib/js/aui-experimental.js",
121
     "aui-experimental-css": "./node_modules/@atlassian/aui/dist/aui/css/aui-experimental.min.css",
120
     "aui-experimental-css": "./node_modules/@atlassian/aui/dist/aui/css/aui-experimental.min.css",
122
     "autosize": "./node_modules/autosize/build/jquery.autosize.js",
121
     "autosize": "./node_modules/autosize/build/jquery.autosize.js",
123
-    "jQuery-Impromptu": "jQuery-Impromptu/src/jquery-impromptu.js",
124
-    "strophe-disco": "./node_modules/strophejs-plugins/disco/strophe.disco.js"
122
+    "jQuery-Impromptu": "jQuery-Impromptu/src/jquery-impromptu.js"
125
   }
123
   }
126
 }
124
 }

+ 1
- 9
react/features/base/lib-jitsi-meet/_.native.js Прегледај датотеку

1
 import './native';
1
 import './native';
2
 
2
 
3
-// The library lib-jitsi-meet (externally) depends on the libraries jQuery and
4
-// Strophe
3
+// The library lib-jitsi-meet (externally) depends on the libraries jQuery
5
 (global => {
4
 (global => {
6
     // jQuery
5
     // jQuery
7
     if (typeof global.$ === 'undefined') {
6
     if (typeof global.$ === 'undefined') {
10
         jQuery(global);
9
         jQuery(global);
11
         global.$ = jQuery;
10
         global.$ = jQuery;
12
     }
11
     }
13
-
14
-    // Strophe
15
-    if (typeof global.Strophe === 'undefined') {
16
-        require('strophe');
17
-        require('strophejs-plugins/disco/strophe.disco');
18
-        require('strophejs-plugins/caps/strophe.caps.jsonly');
19
-    }
20
 })(global || window || this); // eslint-disable-line no-invalid-this
12
 })(global || window || this); // eslint-disable-line no-invalid-this
21
 
13
 
22
 // Re-export JitsiMeetJS from the library lib-jitsi-meet to (the other features
14
 // Re-export JitsiMeetJS from the library lib-jitsi-meet to (the other features

+ 2
- 15
react/features/base/lib-jitsi-meet/native/polyfills-browser.js Прегледај датотеку

143
             document.cookie = '';
143
             document.cookie = '';
144
         }
144
         }
145
 
145
 
146
-        // Document.querySelector
147
-        //
148
-        // Required by:
149
-        // - strophejs-plugins/caps/strophe.caps.jsonly.js
150
-        const documentPrototype = Object.getPrototypeOf(document);
151
-
152
-        if (documentPrototype) {
153
-            if (typeof documentPrototype.querySelector === 'undefined') {
154
-                documentPrototype.querySelector = function(selectors) {
155
-                    return _querySelector(this.elementNode, selectors);
156
-                };
157
-            }
158
-        }
159
-
160
         // Element.querySelector
146
         // Element.querySelector
161
         //
147
         //
162
         // Required by:
148
         // Required by:
163
-        // - strophejs-plugins/caps/strophe.caps.jsonly.js
149
+        // - lib-jitsi-meet/modules/xmpp
164
         const elementPrototype
150
         const elementPrototype
165
             = Object.getPrototypeOf(document.documentElement);
151
             = Object.getPrototypeOf(document.documentElement);
166
 
152
 
212
         // FIXME There is a weird infinite loop related to console.log and
198
         // FIXME There is a weird infinite loop related to console.log and
213
         // Document and/or Element at the time of this writing. Work around it
199
         // Document and/or Element at the time of this writing. Work around it
214
         // by patching Node and/or overriding console.log.
200
         // by patching Node and/or overriding console.log.
201
+        const documentPrototype = Object.getPrototypeOf(document);
215
         const nodePrototype
202
         const nodePrototype
216
             = _getCommonPrototype(documentPrototype, elementPrototype);
203
             = _getCommonPrototype(documentPrototype, elementPrototype);
217
 
204
 

+ 2
- 2
react/features/base/participants/functions.js Прегледај датотеку

1
 // @flow
1
 // @flow
2
+import md5 from 'js-md5';
2
 
3
 
3
 import { toState } from '../redux';
4
 import { toState } from '../redux';
4
 
5
 
6
 
7
 
7
 declare var config: Object;
8
 declare var config: Object;
8
 declare var interfaceConfig: Object;
9
 declare var interfaceConfig: Object;
9
-declare var MD5: Object;
10
 
10
 
11
 /**
11
 /**
12
  * Returns the URL of the image for the avatar of a specific participant.
12
  * Returns the URL of the image for the avatar of a specific participant.
71
         }
71
         }
72
     }
72
     }
73
 
73
 
74
-    return urlPrefix + MD5.hexdigest(key.trim().toLowerCase()) + urlSuffix;
74
+    return urlPrefix + md5.hex(key.trim().toLowerCase()) + urlSuffix;
75
 }
75
 }
76
 
76
 
77
 /**
77
 /**

+ 1
- 15
webpack.config.js Прегледај датотеку

24
         minimize
24
         minimize
25
     })
25
     })
26
 ];
26
 ];
27
-const strophe = /\/node_modules\/strophe(js-plugins)?\/.*\.js$/;
28
 
27
 
29
 if (minimize) {
28
 if (minimize) {
30
     // XXX Webpack's command line argument -p is not enough. Further
29
     // XXX Webpack's command line argument -p is not enough. Further
92
 
91
 
93
             loader: 'expose-loader?$!expose-loader?jQuery',
92
             loader: 'expose-loader?$!expose-loader?jQuery',
94
             test: /\/node_modules\/jquery\/.*\.js$/
93
             test: /\/node_modules\/jquery\/.*\.js$/
95
-        }, {
96
-            // Disable AMD for the Strophe.js library or its imports will fail
97
-            // at runtime.
98
-
99
-            loader: 'imports-loader?define=>false&this=>window',
100
-            test: strophe
101
         }, {
94
         }, {
102
             // Set scope to window for URL polyfill.
95
             // Set scope to window for URL polyfill.
103
 
96
 
122
                 name: '[path][name].[ext]'
115
                 name: '[path][name].[ext]'
123
             },
116
             },
124
             test: /\.(gif|png|svg)$/
117
             test: /\.(gif|png|svg)$/
125
-        } ],
126
-        noParse: [
127
-
128
-            // Do not parse the files of the Strophe.js library or at least
129
-            // parts of the properties of the Strophe global variable will be
130
-            // missing and strophejs-plugins will fail at runtime.
131
-            strophe
132
-        ]
118
+        } ]
133
     },
119
     },
134
     node: {
120
     node: {
135
         // Allow the use of the real filename of the module being executed. By
121
         // Allow the use of the real filename of the module being executed. By

Loading…
Откажи
Сачувај