|
@@ -57,49 +57,6 @@ function _fixRoom(room: ?string) {
|
57
|
57
|
: room;
|
58
|
58
|
}
|
59
|
59
|
|
60
|
|
-/**
|
61
|
|
- * Fixes the hier-part of a specific URI (string) so that the URI is well-known.
|
62
|
|
- * For example, certain Jitsi Meet deployments are not conventional but it is
|
63
|
|
- * possible to translate their URLs into conventional.
|
64
|
|
- *
|
65
|
|
- * @param {string} uri - The URI (string) to fix the hier-part of.
|
66
|
|
- * @private
|
67
|
|
- * @returns {string}
|
68
|
|
- */
|
69
|
|
-function _fixURIStringHierPart(uri) {
|
70
|
|
- // Rewrite the specified URL in order to handle special cases such as
|
71
|
|
- // hipchat.com and enso.me which do not follow the common pattern of most
|
72
|
|
- // Jitsi Meet deployments.
|
73
|
|
-
|
74
|
|
- // hipchat.com
|
75
|
|
- let regex
|
76
|
|
- = new RegExp(
|
77
|
|
- `^${URI_PROTOCOL_PATTERN}//hipchat\\.com/video/call/`,
|
78
|
|
- 'gi');
|
79
|
|
- let match: Array<string> | null = regex.exec(uri);
|
80
|
|
-
|
81
|
|
- if (!match) {
|
82
|
|
- // enso.me
|
83
|
|
- regex
|
84
|
|
- = new RegExp(
|
85
|
|
- `^${URI_PROTOCOL_PATTERN}//enso\\.me/(?:call|meeting)/`,
|
86
|
|
- 'gi');
|
87
|
|
- match = regex.exec(uri);
|
88
|
|
- }
|
89
|
|
- if (match) {
|
90
|
|
- /* eslint-disable no-param-reassign, prefer-template */
|
91
|
|
-
|
92
|
|
- uri
|
93
|
|
- = match[1] /* protocol */
|
94
|
|
- + '//enso.hipchat.me/'
|
95
|
|
- + uri.substring(regex.lastIndex); /* room (name) */
|
96
|
|
-
|
97
|
|
- /* eslint-enable no-param-reassign, prefer-template */
|
98
|
|
- }
|
99
|
|
-
|
100
|
|
- return uri;
|
101
|
|
-}
|
102
|
|
-
|
103
|
60
|
/**
|
104
|
61
|
* Fixes the scheme part of a specific URI (string) so that it contains a
|
105
|
62
|
* well-known scheme such as HTTP(S). For example, the mobile app implements an
|
|
@@ -316,9 +273,7 @@ export function parseURIString(uri: ?string) {
|
316
|
273
|
return undefined;
|
317
|
274
|
}
|
318
|
275
|
|
319
|
|
- const obj
|
320
|
|
- = parseStandardURIString(
|
321
|
|
- _fixURIStringHierPart(_fixURIStringScheme(uri)));
|
|
276
|
+ const obj = parseStandardURIString(_fixURIStringScheme(uri));
|
322
|
277
|
|
323
|
278
|
// Add the properties that are specific to a Jitsi Meet resource (location)
|
324
|
279
|
// such as contextRoot, room:
|