瀏覽代碼

fix(sip-invite) add minor fixes to sip invite flow

master
Tudor-Ovidiu Avram 4 年之前
父節點
當前提交
f0f9c02452

+ 2
- 2
react/features/invite/actions.any.js 查看文件

@@ -81,7 +81,7 @@ export function invite(
81 81
             dispatch(setCalleeInfoVisible(true, invitees[0]));
82 82
         }
83 83
 
84
-        const { conference } = state['features/base/conference'];
84
+        const { conference, password } = state['features/base/conference'];
85 85
 
86 86
         if (typeof conference === 'undefined') {
87 87
             // Invite will fail before CONFERENCE_JOIN. The request will be
@@ -177,7 +177,7 @@ export function invite(
177 177
             sipInviteUrl,
178 178
             jwt,
179 179
             conference.options.name,
180
-            conference.password,
180
+            password,
181 181
             displayName
182 182
         );
183 183
 

+ 4
- 4
react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.js 查看文件

@@ -160,7 +160,7 @@ export default class AbstractAddPeopleDialog<P: Props, S: State>
160 160
                     if (invitedCount >= 3) {
161 161
                         notificationProps = {
162 162
                             titleArguments: {
163
-                                name: invitees[0].name,
163
+                                name: invitees[0].name || invitees[0].address,
164 164
                                 count: invitedCount - 1
165 165
                             },
166 166
                             titleKey: 'notify.invitedThreePlusMembers'
@@ -168,15 +168,15 @@ export default class AbstractAddPeopleDialog<P: Props, S: State>
168 168
                     } else if (invitedCount === 2) {
169 169
                         notificationProps = {
170 170
                             titleArguments: {
171
-                                first: invitees[0].name,
172
-                                second: invitees[1].name
171
+                                first: invitees[0].name || invitees[0].address,
172
+                                second: invitees[1].name || invitees[1].address
173 173
                             },
174 174
                             titleKey: 'notify.invitedTwoMembers'
175 175
                         };
176 176
                     } else if (invitedCount) {
177 177
                         notificationProps = {
178 178
                             titleArguments: {
179
-                                name: invitees[0].name
179
+                                name: invitees[0].name || invitees[0].address
180 180
                             },
181 181
                             titleKey: 'notify.invitedOneMember'
182 182
                         };

+ 1
- 1
react/features/invite/components/add-people-dialog/web/InviteContactsForm.js 查看文件

@@ -356,7 +356,7 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
356 356
                 filterValues: [
357 357
                     sip.address
358 358
                 ],
359
-                content: t('addPeople.sip', { address: sip.address }),
359
+                content: sip.address,
360 360
                 description: '',
361 361
                 item: sip,
362 362
                 value: sip.address

+ 2
- 1
react/features/lobby/components/native/KnockingParticipantList.js 查看文件

@@ -6,6 +6,7 @@ import { ScrollView, Text, View, TouchableOpacity } from 'react-native';
6 6
 import { Avatar } from '../../../base/avatar';
7 7
 import { translate } from '../../../base/i18n';
8 8
 import { connect } from '../../../base/redux';
9
+import { HIDDEN_EMAILS } from '../../constants';
9 10
 import AbstractKnockingParticipantList, {
10 11
     mapStateToProps as abstractMapStateToProps,
11 12
     type Props
@@ -44,7 +45,7 @@ class KnockingParticipantList extends AbstractKnockingParticipantList {
44 45
                             <Text style = { styles.knockingParticipantListText }>
45 46
                                 { p.name }
46 47
                             </Text>
47
-                            { p.email && (
48
+                            { p.email && !HIDDEN_EMAILS.includes(p.email) && (
48 49
                                 <Text style = { styles.knockingParticipantListText }>
49 50
                                     { p.email }
50 51
                                 </Text>

+ 2
- 1
react/features/lobby/components/web/KnockingParticipantList.js 查看文件

@@ -6,6 +6,7 @@ import { Avatar } from '../../../base/avatar';
6 6
 import { translate } from '../../../base/i18n';
7 7
 import { connect } from '../../../base/redux';
8 8
 import { isToolboxVisible } from '../../../toolbox/functions.web';
9
+import { HIDDEN_EMAILS } from '../../constants';
9 10
 import AbstractKnockingParticipantList, {
10 11
     mapStateToProps as abstractMapStateToProps,
11 12
     type Props as AbstractProps
@@ -56,7 +57,7 @@ class KnockingParticipantList extends AbstractKnockingParticipantList<Props> {
56 57
                                 <span data-testid = 'knockingParticipant.name'>
57 58
                                     { p.name }
58 59
                                 </span>
59
-                                { p.email && (
60
+                                { p.email && !HIDDEN_EMAILS.includes(p.email) && (
60 61
                                     <span data-testid = 'knockingParticipant.email'>
61 62
                                         { p.email }
62 63
                                     </span>

+ 4
- 0
react/features/lobby/constants.js 查看文件

@@ -0,0 +1,4 @@
1
+/**
2
+ * Hide these emails when trying to join a lobby
3
+ */
4
+export const HIDDEN_EMAILS = [ 'inbound-sip-jibri@jitsi.net', 'outbound-sip-jibri@jitsi.net' ];

Loading…
取消
儲存