feat(AddPeopleDialog): Add config option to overwrite invite subject app name

This commit is contained in:
Mihai-Andrei Uscat 2021-05-13 12:33:05 +03:00 committed by GitHub
parent 5c08b1ec5b
commit f7b73c0d09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -434,6 +434,10 @@ var config = {
// Base URL for a Gravatar-compatible service. Defaults to libravatar. // Base URL for a Gravatar-compatible service. Defaults to libravatar.
// gravatarBaseURL: 'https://seccdn.libravatar.org/avatar/', // gravatarBaseURL: 'https://seccdn.libravatar.org/avatar/',
// App name to be displayed in the invitation email subject, as an alternative to
// interfaceConfig.APP_NAME.
// inviteAppName: null,
// Moved from interfaceConfig(TOOLBAR_BUTTONS). // Moved from interfaceConfig(TOOLBAR_BUTTONS).
// The name of the toolbar buttons to display in the toolbar, including the // The name of the toolbar buttons to display in the toolbar, including the
// "More actions" menu. If present, the button will display. Exceptions are // "More actions" menu. If present, the button will display. Exceptions are

View File

@ -136,6 +136,7 @@ export default [
'iAmSipGateway', 'iAmSipGateway',
'iceTransportPolicy', 'iceTransportPolicy',
'ignoreStartMuted', 'ignoreStartMuted',
'inviteAppName',
'liveStreamingEnabled', 'liveStreamingEnabled',
'localRecording', 'localRecording',
'maxFullResolutionParticipants', 'maxFullResolutionParticipants',

View File

@ -61,6 +61,11 @@ type Props = {
*/ */
_invitationText: string, _invitationText: string,
/**
* An alternate app name to be displayed in the email subject.
*/
_inviteAppName: ?string,
/** /**
* Whether or not invite contacts should be visible. * Whether or not invite contacts should be visible.
*/ */
@ -104,6 +109,7 @@ function AddPeopleDialog({
_urlSharingVisible, _urlSharingVisible,
_emailSharingVisible, _emailSharingVisible,
_invitationText, _invitationText,
_inviteAppName,
_inviteContactsVisible, _inviteContactsVisible,
_inviteUrl, _inviteUrl,
_liveStreamViewURL, _liveStreamViewURL,
@ -136,7 +142,7 @@ function AddPeopleDialog({
}, []); }, []);
const inviteSubject = t('addPeople.inviteMoreMailSubject', { const inviteSubject = t('addPeople.inviteMoreMailSubject', {
appName: interfaceConfig.APP_NAME appName: _inviteAppName ?? interfaceConfig.APP_NAME
}); });
return ( return (
@ -184,7 +190,7 @@ function AddPeopleDialog({
function mapStateToProps(state, ownProps) { function mapStateToProps(state, ownProps) {
const currentLiveStreamingSession const currentLiveStreamingSession
= getActiveSession(state, JitsiRecordingConstants.mode.STREAM); = getActiveSession(state, JitsiRecordingConstants.mode.STREAM);
const { iAmRecorder } = state['features/base/config']; const { iAmRecorder, inviteAppName } = state['features/base/config'];
const addPeopleEnabled = isAddPeopleEnabled(state); const addPeopleEnabled = isAddPeopleEnabled(state);
const dialOutEnabled = isDialOutEnabled(state); const dialOutEnabled = isDialOutEnabled(state);
const hideInviteContacts = iAmRecorder || (!addPeopleEnabled && !dialOutEnabled); const hideInviteContacts = iAmRecorder || (!addPeopleEnabled && !dialOutEnabled);
@ -200,6 +206,7 @@ function mapStateToProps(state, ownProps) {
_invitationText: getInviteText({ state, _invitationText: getInviteText({ state,
phoneNumber, phoneNumber,
t: ownProps.t }), t: ownProps.t }),
_inviteAppName: inviteAppName,
_inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts, _inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts,
_inviteUrl: getInviteURL(state), _inviteUrl: getInviteURL(state),
_liveStreamViewURL: _liveStreamViewURL: