feat(invite) Consider SHARING_FEATURES on the email invites (#11711)

This commit is contained in:
Horatiu Muresan 2022-06-20 23:18:06 +03:00 committed by GitHub
parent 517ec29d85
commit 3fb3be9727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -26,6 +26,13 @@ import logger from './logger';
declare var $: Function;
declare var interfaceConfig: Object;
export const sharingFeatures = {
email: 'email',
url: 'url',
dialIn: 'dial-in',
embed: 'embed'
};
/**
* Sends an ajax request to check if the phone number can be called.
*
@ -246,7 +253,7 @@ export function getInviteTextiOS({
invite += t('info.inviteTextiOSInviteUrl', { inviteUrl });
invite += ' ';
if (shouldDisplayDialIn(dialIn)) {
if (shouldDisplayDialIn(dialIn) && isSharingEnabled(sharingFeatures.dialIn)) {
invite += t('info.inviteTextiOSPhone', {
number: phoneNumber,
conferenceID: dialIn.conferenceID,
@ -295,7 +302,7 @@ export function getInviteText({
invite = `${invite}\n${liveStream}`;
}
if (shouldDisplayDialIn(dialIn)) {
if (shouldDisplayDialIn(dialIn) && isSharingEnabled(sharingFeatures.dialIn)) {
const dial = t('info.invitePhone', {
number: phoneNumber,
conferenceID: dialIn.conferenceID
@ -801,13 +808,6 @@ export async function executeDialOutStatusRequest(url: string, reqId: string) {
return res.ok ? json : Promise.reject(json);
}
export const sharingFeatures = {
email: 'email',
url: 'url',
dialIn: 'dial-in',
embed: 'embed'
};
/**
* Returns true if a specific sharing feature is enabled in interface configuration.
*