Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(base/connection/native): add a check for vpass meeting when we connect (#15978)
Calinteodorb500c9dcdee4
diff --git a/react/features/base/connection/actions.native.ts b/react/features/base/connection/actions.native.tsindex 0096381507..f71646421e 100644--- a/react/features/base/connection/actions.native.ts+++ b/react/features/base/connection/actions.native.ts@@ -1,10 +1,13 @@import { appNavigate } from '../../app/actions.native';import { IStore } from '../../app/types';+import { getCustomerDetails } from '../../jaas/actions.any';+import { isVpaasMeeting, getJaasJWT } from '../../jaas/functions';import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';import { screen } from '../../mobile/navigation/routes';+import { setJWT } from '../jwt/actions';import { JitsiConnectionErrors } from '../lib-jitsi-meet';-import { _connectInternal } from './actions.any';+import { _connectInternal } from './actions.native';export * from './actions.any';@@ -16,12 +19,32 @@ export * from './actions.any';* @returns {Function}*/export function connect(id?: string, password?: string) {- return (dispatch: IStore['dispatch']) => dispatch(_connectInternal(id, password))+ return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {+ const state = getState();+ const { jwt } = state['features/base/jwt'];++ if (isVpaasMeeting(state)) {+ return dispatch(getCustomerDetails())+ .then(() => {+ if (!jwt) {+ return getJaasJWT(state);+ }+ })+ .then(j => {+ j && dispatch(setJWT(j));++ return dispatch(_connectInternal(id, password));+ });+ }++ dispatch(_connectInternal(id, password))+.catch(error => {if (error === JitsiConnectionErrors.NOT_LIVE_ERROR) {navigateRoot(screen.visitorsQueue);}});+ };}/**