|
@@ -2,6 +2,7 @@
|
2
|
2
|
|
3
|
3
|
import type { Dispatch } from 'redux';
|
4
|
4
|
|
|
5
|
+import { API_ID } from '../../../modules/API/constants';
|
5
|
6
|
import { setRoom } from '../base/conference';
|
6
|
7
|
import {
|
7
|
8
|
configWillLoad,
|
|
@@ -168,9 +169,11 @@ export function redirectWithStoredParams(pathname: string) {
|
168
|
169
|
* window.location.pathname. If the specified pathname is relative, the context
|
169
|
170
|
* root of the Web app will be prepended to the specified pathname before
|
170
|
171
|
* assigning it to window.location.pathname.
|
|
172
|
+ * @param {string} hashParam - Optional hash param to assign to
|
|
173
|
+ * window.location.hash.
|
171
|
174
|
* @returns {Function}
|
172
|
175
|
*/
|
173
|
|
-export function redirectToStaticPage(pathname: string) {
|
|
176
|
+export function redirectToStaticPage(pathname: string, hashParam: ?string) {
|
174
|
177
|
return () => {
|
175
|
178
|
const windowLocation = window.location;
|
176
|
179
|
let newPathname = pathname;
|
|
@@ -184,6 +187,10 @@ export function redirectToStaticPage(pathname: string) {
|
184
|
187
|
newPathname = getLocationContextRoot(windowLocation) + newPathname;
|
185
|
188
|
}
|
186
|
189
|
|
|
190
|
+ if (hashParam) {
|
|
191
|
+ windowLocation.hash = hashParam;
|
|
192
|
+ }
|
|
193
|
+
|
187
|
194
|
windowLocation.pathname = newPathname;
|
188
|
195
|
};
|
189
|
196
|
}
|
|
@@ -285,6 +292,7 @@ export function maybeRedirectToWelcomePage(options: Object = {}) {
|
285
|
292
|
// if close page is enabled redirect to it, without further action
|
286
|
293
|
if (enableClosePage) {
|
287
|
294
|
const { isGuest, jwt } = getState()['features/base/jwt'];
|
|
295
|
+ let hashParam;
|
288
|
296
|
|
289
|
297
|
// save whether current user is guest or not, and pass auth token,
|
290
|
298
|
// before navigating to close page
|
|
@@ -294,12 +302,15 @@ export function maybeRedirectToWelcomePage(options: Object = {}) {
|
294
|
302
|
let path = 'close.html';
|
295
|
303
|
|
296
|
304
|
if (interfaceConfig.SHOW_PROMOTIONAL_CLOSE_PAGE) {
|
|
305
|
+ if (Number(API_ID) === API_ID) {
|
|
306
|
+ hashParam = `#jitsi_meet_external_api_id=${API_ID}`;
|
|
307
|
+ }
|
297
|
308
|
path = 'close3.html';
|
298
|
309
|
} else if (!options.feedbackSubmitted) {
|
299
|
310
|
path = 'close2.html';
|
300
|
311
|
}
|
301
|
312
|
|
302
|
|
- dispatch(redirectToStaticPage(`static/${path}`));
|
|
313
|
+ dispatch(redirectToStaticPage(`static/${path}`, hashParam));
|
303
|
314
|
|
304
|
315
|
return;
|
305
|
316
|
}
|