Updates copy info with parltcipant name info if available.

This commit is contained in:
damencho 2019-05-09 09:37:21 +01:00 committed by yanas
parent ff6b27eafa
commit 9bde673397
2 changed files with 19 additions and 4 deletions

View File

@ -357,7 +357,9 @@
"inviteLiveStream": "To view the live stream of this meeting, click this link: __url__",
"invitePhone": "One tap audio Dial In: __number__,,__conferenceID__#",
"invitePhoneAlternatives": "Looking for a different dial in number? Please see: __url__",
"inviteURL": "You are invited to join a meeting.\n__moreInfo__\nJoin meeting: __url__\n",
"inviteURLFirstPartGeneral": "You are invited to join a meeting.",
"inviteURLFirstPartPersonal": "__name__ is inviting you to a meeting.",
"inviteURLSecondPart": "\n__moreInfo__\nJoin meeting: __url__\n",
"inviteURLMoreInfo": "Meeting ID: __conferenceID__#\n",
"liveStreamURL": "Live stream:",
"moreNumbers": "More numbers",

View File

@ -8,7 +8,10 @@ import { getInviteURL } from '../../../../base/connection';
import { Dialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n';
import { connect } from '../../../../base/redux';
import { isLocalParticipantModerator } from '../../../../base/participants';
import {
isLocalParticipantModerator,
getLocalParticipant
} from '../../../../base/participants';
import { _getDefaultPhoneNumber, getDialInfoPageURL } from '../../../functions';
import DialInNumber from './DialInNumber';
@ -42,6 +45,11 @@ type Props = {
*/
_inviteURL: string,
/**
* The redux representation of the local participant.
*/
_localParticipant: Object,
/**
* The current location url of the conference.
*/
@ -293,14 +301,18 @@ class InfoDialog extends Component<Props, State> {
* @returns {string}
*/
_getTextToCopy() {
const { liveStreamViewURL, t } = this.props;
const { _localParticipant, liveStreamViewURL, t } = this.props;
const shouldDisplayDialIn = this._shouldDisplayDialIn();
const moreInfo
= shouldDisplayDialIn
? t('info.inviteURLMoreInfo', { conferenceID: this.props.dialIn.conferenceID })
: '';
let invite = t('info.inviteURL', {
let invite = _localParticipant && _localParticipant.name
? t('info.inviteURLFirstPartPersonal', { name: _localParticipant.name })
: t('info.inviteURLFirstPartGeneral');
invite += t('info.inviteURLSecondPart', {
url: this.props._inviteURL,
moreInfo
});
@ -580,6 +592,7 @@ function _mapStateToProps(state) {
_conference: conference,
_conferenceName: room,
_inviteURL: getInviteURL(state),
_localParticipant: getLocalParticipant(state),
_locationURL: state['features/base/connection'].locationURL,
_locked: locked,
_password: password