agora-appbuilder-core 4.1.17-beta.1 → 4.1.18-beta.1

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.17-beta.1",
3
+ "version": "4.1.18-beta.1",
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.17-beta.1',
81
- CORE_VERSION: '4.1.17-beta.1',
80
+ CLI_VERSION: '3.1.18-beta.1',
81
+ CORE_VERSION: '4.1.18-beta.1',
82
82
  DISABLE_LANDSCAPE_MODE: false,
83
83
  STT_AUTO_START: false,
84
84
  CLOUD_RECORDING_AUTO_START: false,
@@ -57,6 +57,10 @@ const ChatParticipants = (props: any) => {
57
57
 
58
58
  const noOneElseJoinedYet = useString(inviteTileNoElseJoinedYetText)();
59
59
 
60
+ const eligibleUids: UidType[] = $config.EVENT_MODE
61
+ ? [...new Set([...hostUids, ...audienceUids])]
62
+ : activeUids?.filter(uid => !customContent[uid]) ?? [];
63
+
60
64
  return (
61
65
  <ScrollView>
62
66
  {
@@ -71,52 +75,20 @@ const ChatParticipants = (props: any) => {
71
75
  <></>
72
76
  )
73
77
  }
74
- {Object.keys(defaultContent)
75
- .map(i => parseInt(i))
76
- .filter(i => {
77
- try {
78
- if (isNaN(i)) {
79
- return false;
80
- } else {
81
- const userId = i;
82
- const userInfo = defaultContent[userId];
83
-
84
- // if user is not in active uids, then skip it
85
- if (!activeUids.includes(userId)) {
86
- return false;
87
- }
88
- //video meeting with waiting room
89
- if (
90
- $config.ENABLE_WAITING_ROOM &&
91
- !$config.EVENT_MODE &&
92
- activeUids?.indexOf(userId) === -1
93
- ) {
94
- return false;
95
- }
96
- //livestreaming with waiting room
97
- if (
98
- $config.ENABLE_WAITING_ROOM &&
99
- $config.EVENT_MODE &&
100
- hostUids?.concat(audienceUids)?.indexOf(userId) === -1
101
- ) {
102
- return false;
103
- }
104
- return (
105
- userId !== localUid && //user can't chat with own user
106
- // @ts-ignore
107
- userId !== '1' && //user can't chat with pstn user
108
- userInfo?.type === 'rtc' &&
109
- !userInfo?.offline
110
- );
111
- }
112
- } catch (error) {
113
- return false;
114
- }
78
+ {eligibleUids
79
+ .filter(userId => {
80
+ const userInfo = defaultContent[userId];
81
+ return (
82
+ userId !== localUid &&
83
+ userId !== 1 &&
84
+ userInfo?.type === 'rtc' &&
85
+ !userInfo?.offline
86
+ );
115
87
  })
116
88
  .sort((a, b) => {
117
89
  return (
118
- defaultContent[b]?.lastMessageTimeStamp -
119
- defaultContent[a]?.lastMessageTimeStamp
90
+ (defaultContent[b]?.lastMessageTimeStamp ?? 0) -
91
+ (defaultContent[a]?.lastMessageTimeStamp ?? 0)
120
92
  );
121
93
  })
122
94
  .map(uid => {