|
@@ -15,10 +15,10 @@ import {
|
15
|
15
|
CONNECTION_DISCONNECTED,
|
16
|
16
|
CONNECTION_FAILED,
|
17
|
17
|
JITSI_CONNECTION_CONFERENCE_KEY,
|
18
|
|
- JITSI_CONNECTION_URL_KEY
|
|
18
|
+ JITSI_CONNECTION_URL_KEY,
|
|
19
|
+ getURLWithoutParams
|
19
|
20
|
} from '../../base/connection';
|
20
|
21
|
import { MiddlewareRegistry } from '../../base/redux';
|
21
|
|
-import { toURLString } from '../../base/util';
|
22
|
22
|
import { ENTER_PICTURE_IN_PICTURE } from '../picture-in-picture';
|
23
|
23
|
|
24
|
24
|
import { sendEvent } from './functions';
|
|
@@ -82,7 +82,7 @@ MiddlewareRegistry.register(store => next => action => {
|
82
|
82
|
store,
|
83
|
83
|
CONFERENCE_TERMINATED,
|
84
|
84
|
/* data */ {
|
85
|
|
- url: toURLString(locationURL)
|
|
85
|
+ url: _normalizeUrl(locationURL)
|
86
|
86
|
});
|
87
|
87
|
}
|
88
|
88
|
|
|
@@ -106,7 +106,7 @@ MiddlewareRegistry.register(store => next => action => {
|
106
|
106
|
CONFERENCE_TERMINATED,
|
107
|
107
|
/* data */ {
|
108
|
108
|
error: _toErrorString(error),
|
109
|
|
- url: toURLString(locationURL)
|
|
109
|
+ url: _normalizeUrl(locationURL)
|
110
|
110
|
});
|
111
|
111
|
break;
|
112
|
112
|
}
|
|
@@ -161,10 +161,20 @@ function _maybeTriggerEarlyConferenceWillJoin(store, action) {
|
161
|
161
|
store,
|
162
|
162
|
CONFERENCE_WILL_JOIN,
|
163
|
163
|
/* data */ {
|
164
|
|
- url: toURLString(locationURL)
|
|
164
|
+ url: _normalizeUrl(locationURL)
|
165
|
165
|
});
|
166
|
166
|
}
|
167
|
167
|
|
|
168
|
+/**
|
|
169
|
+ * Normalizes the given URL for presentation over the external API.
|
|
170
|
+ *
|
|
171
|
+ * @param {URL} url -The URL to normalize.
|
|
172
|
+ * @returns {string} - The normalized URL as a string.
|
|
173
|
+ */
|
|
174
|
+function _normalizeUrl(url: URL) {
|
|
175
|
+ return getURLWithoutParams(url).href;
|
|
176
|
+}
|
|
177
|
+
|
168
|
178
|
/**
|
169
|
179
|
* Sends an event to the native counterpart of the External API for a specific
|
170
|
180
|
* conference-related redux action.
|
|
@@ -186,7 +196,7 @@ function _sendConferenceEvent(
|
186
|
196
|
// instance. The external API cannot transport such an object so we have to
|
187
|
197
|
// transport an "equivalent".
|
188
|
198
|
if (conference) {
|
189
|
|
- data.url = toURLString(conference[JITSI_CONFERENCE_URL_KEY]);
|
|
199
|
+ data.url = _normalizeUrl(conference[JITSI_CONFERENCE_URL_KEY]);
|
190
|
200
|
}
|
191
|
201
|
|
192
|
202
|
if (_swallowEvent(store, action, data)) {
|
|
@@ -233,7 +243,7 @@ function _sendConferenceFailedOnConnectionError(store, action) {
|
233
|
243
|
store,
|
234
|
244
|
CONFERENCE_TERMINATED,
|
235
|
245
|
/* data */ {
|
236
|
|
- url: toURLString(locationURL),
|
|
246
|
+ url: _normalizeUrl(locationURL),
|
237
|
247
|
error: action.error.name
|
238
|
248
|
});
|
239
|
249
|
}
|