Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(dynamic-branding): Add etherpadBase

Hristo Terezov462f91f070b7
diff --git a/modules/UI/UI.js b/modules/UI/UI.js
index 6b5010413c..90349dc5eb 100644
--- a/modules/UI/UI.js
+++ b/modules/UI/UI.js
@@ -120,7 +120,9 @@ UI.unbindEvents = () => {
* @param {string} name etherpad id
*/
UI.initEtherpad = name => {
- const etherpadBaseUrl = sanitizeUrl(config.etherpad_base);
+ const { getState, dispatch } = APP.store;
+ const configState = getState()['features/base/config'];
+ const etherpadBaseUrl = sanitizeUrl(configState.etherpad_base);
if (etherpadManager || !etherpadBaseUrl || !name) {
return;
@@ -131,9 +133,9 @@ UI.initEtherpad = name => {
const url = new URL(name, etherpadBaseUrl);
- APP.store.dispatch(setDocumentUrl(url.toString()));
+ dispatch(setDocumentUrl(url.toString()));
- if (config.openSharedDocumentOnJoin) {
+ if (configState.openSharedDocumentOnJoin) {
etherpadManager.toggleEtherpad();
}
};
diff --git a/react/features/analytics/functions.ts b/react/features/analytics/functions.ts
index 8c5dd63beb..86a275bf6c 100644
--- a/react/features/analytics/functions.ts
+++ b/react/features/analytics/functions.ts
@@ -211,7 +211,6 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
overwritesCustomParticipantButtonsWithURL?: boolean;
overwritesDefaultLogoUrl?: boolean;
overwritesDeploymentUrls?: boolean;
- overwritesEtherpadBase?: boolean;
overwritesLiveStreamingUrls?: boolean;
overwritesSalesforceUrl?: boolean;
overwritesSupportUrl?: boolean;
@@ -257,7 +256,6 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
permanentProperties.overwritesSupportUrl = 'interfaceConfig.SUPPORT_URL' in params;
permanentProperties.overwritesSalesforceUrl = 'config.salesforceUrl' in params;
permanentProperties.overwritesDefaultLogoUrl = 'config.defaultLogoUrl' in params;
- permanentProperties.overwritesEtherpadBase = 'config.etherpad_base' in params;
const deploymentUrlsConfig = params['config.deploymentUrls'] ?? {};
diff --git a/react/features/base/config/middleware.ts b/react/features/base/config/middleware.ts
index 0acb9d2969..0750809a3c 100644
--- a/react/features/base/config/middleware.ts
+++ b/react/features/base/config/middleware.ts
@@ -115,6 +115,7 @@ function _setDynamicBrandingData({ dispatch }: IStore, next: Function, action: A
const config: IConfig = {};
const {
downloadAppsUrl,
+ etherpadBase,
liveStreamingDialogUrls = {},
preCallTest = {},
salesforceUrl,
@@ -167,6 +168,11 @@ function _setDynamicBrandingData({ dispatch }: IStore, next: Function, action: A
};
}
+ if (etherpadBase) {
+ // eslint-disable-next-line camelcase
+ config.etherpad_base = etherpadBase;
+ }
+
if (iceUrl) {
config.prejoinConfig = config.prejoinConfig || {};
config.prejoinConfig.preCallTestICEUrl = iceUrl;
diff --git a/react/features/dynamic-branding/middleware.native.ts b/react/features/dynamic-branding/middleware.native.ts
index d39a53eec4..92fcae4fc1 100644
--- a/react/features/dynamic-branding/middleware.native.ts
+++ b/react/features/dynamic-branding/middleware.native.ts
@@ -24,6 +24,7 @@ MiddlewareRegistry.register(store => next => action => {
brandedIcons,
didPageUrl,
downloadAppsUrl,
+ etherpadBase,
inviteDomain,
labels,
liveStreamingDialogUrls,
@@ -41,6 +42,7 @@ MiddlewareRegistry.register(store => next => action => {
brandedIcons,
didPageUrl,
downloadAppsUrl,
+ etherpadBase,
inviteDomain,
labels,
liveStreamingDialogUrls,