Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(auth) move common actions to actions.any

Saúl Ibarra Corretgé3d6aa8f2b5aa
diff --git a/react/features/authentication/actions.any.ts b/react/features/authentication/actions.any.ts
index 09e70d483a..32ffdf3665 100644
--- a/react/features/authentication/actions.any.ts
+++ b/react/features/authentication/actions.any.ts
@@ -4,6 +4,8 @@ import { IJitsiConference } from '../base/conference/reducer';
import { hideDialog, openDialog } from '../base/dialog/actions';
import {
+ LOGIN,
+ LOGOUT,
SET_TOKEN_AUTH_URL_SUCCESS,
STOP_WAIT_FOR_OWNER,
UPGRADE_ROLE_FINISHED,
@@ -137,6 +139,32 @@ export function hideLoginDialog() {
return hideDialog(LoginDialog);
}
+/**
+ * Login.
+ *
+ * @returns {{
+* type: LOGIN
+* }}
+*/
+export function login() {
+ return {
+ type: LOGIN
+ };
+}
+
+/**
+* Logout.
+*
+* @returns {{
+* type: LOGOUT
+* }}
+*/
+export function logout() {
+ return {
+ type: LOGOUT
+ };
+}
+
/**
* Opens {@link WaitForOnwerDialog}.
*
diff --git a/react/features/authentication/actions.native.ts b/react/features/authentication/actions.native.ts
index ac2e469267..20962f1a2e 100644
--- a/react/features/authentication/actions.native.ts
+++ b/react/features/authentication/actions.native.ts
@@ -7,7 +7,7 @@ import { connectionFailed } from '../base/connection/actions.native';
import { set } from '../base/redux/functions';
import { appendURLHashParam } from '../base/util/uri';
-import { CANCEL_LOGIN, LOGIN } from './actionTypes';
+import { CANCEL_LOGIN } from './actionTypes';
import { stopWaitForOwner } from './actions.any';
export * from './actions.any';
@@ -94,16 +94,3 @@ export function openTokenAuthUrl(tokenAuthServiceUrl: string) {
Linking.openURL(url);
};
}
-
-/**
- * Login.
- *
- * @returns {{
- * type: LOGIN
- * }}
- */
-export function login() {
- return {
- type: LOGIN
- };
-}
diff --git a/react/features/authentication/actions.web.ts b/react/features/authentication/actions.web.ts
index 0753b7a66c..8d3d71de8d 100644
--- a/react/features/authentication/actions.web.ts
+++ b/react/features/authentication/actions.web.ts
@@ -4,11 +4,7 @@ import { openDialog } from '../base/dialog/actions';
import { browser } from '../base/lib-jitsi-meet';
import { appendURLHashParam } from '../base/util/uri';
-import {
- CANCEL_LOGIN,
- LOGIN,
- LOGOUT
-} from './actionTypes';
+import { CANCEL_LOGIN } from './actionTypes';
import LoginQuestionDialog from './components/web/LoginQuestionDialog';
export * from './actions.any';
@@ -51,32 +47,6 @@ 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
- };
-}
-
/**
* Opens token auth URL page.
*