From 9bde6733975ec7e013cb39f21c52c3fae3031c34 Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 9 May 2019 09:37:21 +0100 Subject: [PATCH] Updates copy info with parltcipant name info if available. --- lang/main.json | 4 +++- .../components/info-dialog/web/InfoDialog.js | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lang/main.json b/lang/main.json index 7bb49fdb5..58df9c6e7 100644 --- a/lang/main.json +++ b/lang/main.json @@ -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", diff --git a/react/features/invite/components/info-dialog/web/InfoDialog.js b/react/features/invite/components/info-dialog/web/InfoDialog.js index 4cbf1a3f2..e005446ad 100644 --- a/react/features/invite/components/info-dialog/web/InfoDialog.js +++ b/react/features/invite/components/info-dialog/web/InfoDialog.js @@ -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 { * @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