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

This commit is contained in:
Tudor-Ovidiu Avram 2021-04-20 16:05:49 +03:00
parent ef4af415a8
commit f0f9c02452
6 changed files with 15 additions and 9 deletions

View File

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

View File

@ -160,7 +160,7 @@ export default class AbstractAddPeopleDialog<P: Props, S: State>
if (invitedCount >= 3) {
notificationProps = {
titleArguments: {
name: invitees[0].name,
name: invitees[0].name || invitees[0].address,
count: invitedCount - 1
},
titleKey: 'notify.invitedThreePlusMembers'
@ -168,15 +168,15 @@ export default class AbstractAddPeopleDialog<P: Props, S: State>
} else if (invitedCount === 2) {
notificationProps = {
titleArguments: {
first: invitees[0].name,
second: invitees[1].name
first: invitees[0].name || invitees[0].address,
second: invitees[1].name || invitees[1].address
},
titleKey: 'notify.invitedTwoMembers'
};
} else if (invitedCount) {
notificationProps = {
titleArguments: {
name: invitees[0].name
name: invitees[0].name || invitees[0].address
},
titleKey: 'notify.invitedOneMember'
};

View File

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

View File

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

View File

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

View File

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