agora-appbuilder-core 4.1.7-beta.1 → 4.1.7-beta.3

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.1.7-beta.1",
3
+ "version": "4.1.7-beta.3",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -77,8 +77,8 @@ const DefaultConfig = {
77
77
  CHAT_ORG_NAME: '',
78
78
  CHAT_APP_NAME: '',
79
79
  CHAT_URL: '',
80
- CLI_VERSION: '3.1.7-beta.1',
81
- CORE_VERSION: '4.1.7-beta.1',
80
+ CLI_VERSION: '3.1.7-beta.3',
81
+ CORE_VERSION: '4.1.7-beta.3',
82
82
  DISABLE_LANDSCAPE_MODE: false,
83
83
  STT_AUTO_START: false,
84
84
  CLOUD_RECORDING_AUTO_START: false,
@@ -330,6 +330,18 @@ export const AgentProvider: React.FC<{children: React.ReactNode}> = ({
330
330
  secondaryBtn: null,
331
331
  leadingIcon: null,
332
332
  });
333
+ } else if (agentConnectError.toString().indexOf('403') !== -1) {
334
+ Toast.show({
335
+ leadingIconName: 'alert',
336
+ type: 'error',
337
+ text1: 'Uh oh! Agent failed to connect',
338
+ text2:
339
+ "Verify if you've enabled your project for Agora Conversational AI on Agora Console. Or if your project's customer ID and certificate is configured correctly.",
340
+ visibilityTime: 5000,
341
+ primaryBtn: null,
342
+ secondaryBtn: null,
343
+ leadingIcon: null,
344
+ });
333
345
  } else {
334
346
  Toast.show({
335
347
  leadingIconName: 'alert',
@@ -73,7 +73,11 @@ export const AgentControl: React.FC = () => {
73
73
  ) : (
74
74
  <Image style={{width: 24, height: 24}} source={LeaveCallIcon} />
75
75
  )}
76
- {!isMobileUA() && !(agentConnectionState === 'AGENT_CONNECTED') ? (
76
+ {!isMobileUA() &&
77
+ !(
78
+ agentConnectionState === 'AGENT_CONNECTED' ||
79
+ agentConnectionState === 'AGENT_DISCONNECT_FAILED'
80
+ ) ? (
77
81
  <Text
78
82
  style={{
79
83
  fontFamily: ThemeConfig.FontFamily.sansPro,
@@ -84,7 +84,9 @@ export default function ConversationalAI() {
84
84
  )}
85
85
  </View>
86
86
  <View style={styles.btnContainer}>
87
- {!isLoading && agentConnectionState === 'AGENT_CONNECTED' ? (
87
+ {!isLoading &&
88
+ (agentConnectionState === 'AGENT_CONNECTED' ||
89
+ agentConnectionState === 'AGENT_DISCONNECT_FAILED') ? (
88
90
  <View style={styles.controlsContainer}>
89
91
  <MicButton />
90
92
  <TranscriptButton />
@@ -51,7 +51,9 @@ export default function NewAnimation() {
51
51
  <AiAgentCustomView connectionState={agentConnectionState} />
52
52
  </View>
53
53
  <View style={styles.btnContainer}>
54
- {!isLoading && agentConnectionState === 'AGENT_CONNECTED' ? (
54
+ {!isLoading &&
55
+ (agentConnectionState === 'AGENT_CONNECTED' ||
56
+ agentConnectionState === 'AGENT_DISCONNECT_FAILED') ? (
55
57
  <View style={styles.controlsContainer}>
56
58
  <MicButton />
57
59
  <TranscriptButton />
@@ -72,6 +72,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
72
72
  waitingRoomButton({
73
73
  ready: isInWaitingRoom,
74
74
  isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
75
+ isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
75
76
  }),
76
77
  );
77
78
  const {request: requestToJoin} = useWaitingRoomAPI();
@@ -121,6 +122,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
121
122
  waitingRoomButton({
122
123
  ready: !isInWaitingRoom,
123
124
  isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
125
+ isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
124
126
  }),
125
127
  );
126
128
  }, [isInWaitingRoom]);
@@ -89,6 +89,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
89
89
  waitingRoomButton({
90
90
  ready: isInWaitingRoom,
91
91
  isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
92
+ isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
92
93
  }),
93
94
  );
94
95
 
@@ -272,6 +273,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
272
273
  waitingRoomButton({
273
274
  ready: !isInWaitingRoom,
274
275
  isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
276
+ isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
275
277
  }),
276
278
  );
277
279
  }, [isInWaitingRoom]);
@@ -10,6 +10,7 @@ export interface PrecallJoinBtnTextInterface {
10
10
  export interface PrecallWaitingRoomJoinBtnTextInterface {
11
11
  ready: boolean;
12
12
  isAutoRequest: boolean;
13
+ isAutoApproval: boolean;
13
14
  }
14
15
 
15
16
  export const permissionPopupHeading = `permissionPopupHeading`;
@@ -135,12 +136,10 @@ export const PrecallScreenLabels: I18nPrecallScreenLabelsInterface = {
135
136
  [precallYouAreJoiningAsHeading]: 'You are joining',
136
137
  [precallNameInputPlaceholderText]: 'Enter Your Name',
137
138
  [precallInputGettingName]: 'Getting name...',
138
- [precallWaitingRoomJoinBtnText]: ({ready, isAutoRequest}) => {
139
- return isAutoRequest
140
- ? 'Joining...'
141
- : ready
142
- ? 'Ask To Join'
143
- : `Waiting for approval...`;
139
+ [precallWaitingRoomJoinBtnText]: ({ready, isAutoRequest, isAutoApproval}) => {
140
+ return ready
141
+ ? isAutoRequest? 'Meeting Started, Join Now !': 'Ask To Join'
142
+ : isAutoApproval?'Joining...': `Waiting for approval...`
144
143
  },
145
144
 
146
145
  [precallJoinBtnText]: ({waitingRoom, ready, role}) => {
@@ -132,6 +132,10 @@ export const ReplyMessageBubble = ({
132
132
  if (repliedMsg.length == 0 && chatType === ChatType.Private) {
133
133
  repliedMsg = messageStore.filter(msg => msg.msgId === repliedMsgId);
134
134
  }
135
+
136
+ if (repliedMsg.length == 0) {
137
+ return null;
138
+ }
135
139
  const isAttachMsg = repliedMsg[0]?.type !== ChatMessageType.TXT;
136
140
 
137
141
  let time = formatAMPM(new Date(repliedMsg[0]?.createdTimestamp));