mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-16 17:17:47 +00:00
* feat: Drops connection on prejoin screen. Refactors connection logic to reuse already existing logic from mobile. Connection is now established just before joining the room. Fixes some authentication logic with Login and Logout button in Profile tab. * squash: Drops createInitialLocalTracksAndConnect as it no longer connects. * squash: Shows an error on mobile and redirects to default. * squash: Fixes review comments. * squash: Fixes joining with prejoin disabled. * squash: Fixes adding initial local tracks. * squash: Fixes comments. * squash: Drop no longer used method. * squash: Fixes old web code imported into mobile builds. * squash: Drop unused prop. * squash: Drops recoverable flag on REDIRECT. * squash: Drops unused variable and fix connection access. * squash: Xmpp connect returns promise again. * squash: Execute xmpp connect and creating local tracks in parallel. * squash: Moves notification about problem jwt. * squash: Moves startConference to conference.js for the no prejoin case. And move the startConference in prejoin feature for the prejoin case. * squash: Fix passing filtered tracks when starting conference with no prejoin. * squash: Fix clearing listeners on connection established. Keeps mobile behaviour after merging web and mobile. * squash: Drops unused code.
72 lines
2.4 KiB
TypeScript
72 lines
2.4 KiB
TypeScript
import { appNavigate } from '../app/actions.native';
|
|
import { IStore } from '../app/types';
|
|
import { conferenceLeft } from '../base/conference/actions';
|
|
import { connectionFailed } from '../base/connection/actions.native';
|
|
import { set } from '../base/redux/functions';
|
|
|
|
import { CANCEL_LOGIN } from './actionTypes';
|
|
import { stopWaitForOwner } from './actions.any';
|
|
|
|
export * from './actions.any';
|
|
|
|
/**
|
|
* Cancels {@ink LoginDialog}.
|
|
*
|
|
* @returns {{
|
|
* type: CANCEL_LOGIN
|
|
* }}
|
|
*/
|
|
export function cancelLogin() {
|
|
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
|
dispatch({ type: CANCEL_LOGIN });
|
|
|
|
// XXX The error associated with CONNECTION_FAILED was marked as
|
|
// recoverable by the authentication feature and, consequently,
|
|
// recoverable-aware features such as mobile's external-api did not
|
|
// deliver the CONFERENCE_FAILED to the SDK clients/consumers (as
|
|
// a reaction to CONNECTION_FAILED). Since the
|
|
// app/user is going to navigate to WelcomePage, the SDK
|
|
// clients/consumers need an event.
|
|
const { error = { recoverable: undefined }, passwordRequired }
|
|
= getState()['features/base/connection'];
|
|
|
|
passwordRequired
|
|
&& dispatch(
|
|
connectionFailed(
|
|
passwordRequired,
|
|
set(error, 'recoverable', false) as any));
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Cancels {@link WaitForOwnerDialog}. Will navigate back to the welcome page.
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
export function cancelWaitForOwner() {
|
|
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
|
dispatch(stopWaitForOwner());
|
|
|
|
// XXX The error associated with CONFERENCE_FAILED was marked as
|
|
// recoverable by the feature room-lock and, consequently,
|
|
// recoverable-aware features such as mobile's external-api did not
|
|
// deliver the CONFERENCE_FAILED to the SDK clients/consumers. Since the
|
|
// app/user is going to nativate to WelcomePage, the SDK
|
|
// clients/consumers need an event.
|
|
const { authRequired } = getState()['features/base/conference'];
|
|
|
|
authRequired && dispatch(conferenceLeft(authRequired));
|
|
|
|
dispatch(appNavigate(undefined));
|
|
};
|
|
}
|
|
|
|
/** .
|
|
* Redirect to the default location (e.g. Welcome page).
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
export function redirectToDefaultLocation() {
|
|
return (dispatch: IStore['dispatch']) => dispatch(appNavigate(undefined));
|
|
}
|