From 3fb3be97271abeeda6d5930c01bdcd6b8e173130 Mon Sep 17 00:00:00 2001 From: Horatiu Muresan <39557534+horymury@users.noreply.github.com> Date: Mon, 20 Jun 2022 23:18:06 +0300 Subject: [PATCH] feat(invite) Consider SHARING_FEATURES on the email invites (#11711) --- react/features/invite/functions.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/react/features/invite/functions.js b/react/features/invite/functions.js index 587e83d34f..ae7543bdd1 100644 --- a/react/features/invite/functions.js +++ b/react/features/invite/functions.js @@ -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. *