mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-03-03 18:20:22 +00:00
While the host arrives all other participants are waiting in lobby and once the host arrives lobby is destroyed and the participants join the call. Adds reading some other fields in jwt to extract email. Introduces tokenLogoutUrl to be used for logout.
75 lines
1.4 KiB
TypeScript
75 lines
1.4 KiB
TypeScript
import { maybeRedirectToWelcomePage } from '../app/actions.web';
|
|
import { IStore } from '../app/types';
|
|
|
|
import {
|
|
CANCEL_LOGIN,
|
|
LOGIN,
|
|
LOGOUT
|
|
} from './actionTypes';
|
|
|
|
export * from './actions.any';
|
|
|
|
/**
|
|
* Cancels {@ink LoginDialog}.
|
|
*
|
|
* @returns {{
|
|
* type: CANCEL_LOGIN
|
|
* }}
|
|
*/
|
|
export function cancelLogin() {
|
|
return {
|
|
type: CANCEL_LOGIN
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Cancels authentication, closes {@link WaitForOwnerDialog}
|
|
* and navigates back to the welcome page only in the case of authentication required error.
|
|
* We can be showing the dialog while lobby is enabled and participant is still waiting there and hiding this dialog
|
|
* should do nothing.
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
export function cancelWaitForOwner() {
|
|
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
|
const { authRequired } = getState()['features/base/conference'];
|
|
|
|
authRequired && dispatch(maybeRedirectToWelcomePage());
|
|
};
|
|
}
|
|
|
|
/** .
|
|
* Redirect to the default location (e.g. Welcome page).
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
export function redirectToDefaultLocation() {
|
|
return (dispatch: IStore['dispatch']) => dispatch(maybeRedirectToWelcomePage());
|
|
}
|
|
|
|
/**
|
|
* Login.
|
|
*
|
|
* @returns {{
|
|
* type: LOGIN
|
|
* }}
|
|
*/
|
|
export function login() {
|
|
return {
|
|
type: LOGIN
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Logout.
|
|
*
|
|
* @returns {{
|
|
* type: LOGOUT
|
|
* }}
|
|
*/
|
|
export function logout() {
|
|
return {
|
|
type: LOGOUT
|
|
};
|
|
}
|