agora-appbuilder-core 4.0.25-beta-9 → 4.0.25-beta-11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.25-beta-9",
3
+ "version": "4.0.25-beta-11",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -76,8 +76,8 @@ const DefaultConfig = {
76
76
  CHAT_ORG_NAME: '',
77
77
  CHAT_APP_NAME: '',
78
78
  CHAT_URL: '',
79
- CLI_VERSION: '4.0.25-beta-9',
80
- CORE_VERSION: '3.0.25-beta-9',
79
+ CLI_VERSION: '3.0.25-beta-11',
80
+ CORE_VERSION: '4.0.25-beta-11',
81
81
  };
82
82
 
83
83
  module.exports = DefaultConfig;
@@ -39,6 +39,7 @@ import {
39
39
  } from '../language/default-labels/commonLabels';
40
40
  import {LogSource, logger} from '../logger/AppBuilderLogger';
41
41
  import getUniqueID from '../utils/getUniqueID';
42
+ import {useIsRecordingBot} from '../subComponents/recording/useIsRecordingBot';
42
43
 
43
44
  export const GET_USER = gql`
44
45
  query getUser {
@@ -83,7 +84,7 @@ const AuthProvider = (props: AuthProviderProps) => {
83
84
  const location = useLocation();
84
85
  // client
85
86
  const apolloClient = useApolloClient();
86
-
87
+ const {isRecordingBot} = useIsRecordingBot();
87
88
  const indexesOf = (arr, item) =>
88
89
  arr.reduce((acc, v, i) => (v === item && acc.push(i), acc), []);
89
90
  const nonprodenv = ['dev', 'staging', 'preprod', 'test'];
@@ -348,6 +349,16 @@ const AuthProvider = (props: AuthProviderProps) => {
348
349
  // Ignore if on sdk since IDP flow is not supported
349
350
  // For unauthenticated flow authLogin should be called to get the token
350
351
  logger.log(LogSource.Internals, 'AUTH', 'App loaded');
352
+ if (isRecordingBot) {
353
+ logger.debug(
354
+ LogSource.Internals,
355
+ 'AUTH',
356
+ 'skip app authentication as it is a bot',
357
+ );
358
+ setIsAuthenticated(true);
359
+ setLoading(false);
360
+ return;
361
+ }
351
362
  if (isSDK() && ENABLE_AUTH) {
352
363
  setIsAuthenticated(true);
353
364
  setLoading(false);
@@ -401,7 +412,7 @@ const AuthProvider = (props: AuthProviderProps) => {
401
412
  setLoading(false);
402
413
  }
403
414
  }
404
- }, []);
415
+ }, [isRecordingBot]);
405
416
 
406
417
  const authLogin = () => {
407
418
  // Authenticated login flow