Skip to content

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

fix(analytics): overwritesCustomButtonsWithURL metric

Hristo Terezov2edca5dacb4f
diff --git a/react/features/analytics/functions.ts b/react/features/analytics/functions.ts
index 5d7f8a4f87..94cedd3bd2 100644
--- a/react/features/analytics/functions.ts
+++ b/react/features/analytics/functions.ts
@@ -152,30 +152,6 @@ export async function createHandlers({ getState }: IStore) {
return handlers;
}
-/**
- * Checks whether a url is a data URL or not.
- *
- * @param {string} url - The URL to be checked.
- * @returns {boolean}
- */
-function isDataURL(url?: string): boolean {
- if (typeof url !== 'string') { // The icon will be ignored
- return false;
- }
-
- try {
- const urlObject = new URL(url);
-
- if (urlObject.protocol === 'data:') {
- return false;
- }
- } catch {
- return false;
- }
-
- return true;
-}
-
/**
* Inits JitsiMeetJS.analytics by setting permanent properties and setting the handlers from the loaded scripts.
* NOTE: Has to be used after JitsiMeetJS.init. Otherwise analytics will be null.
@@ -277,10 +253,7 @@ export function initAnalytics(store: IStore, handlers: Array<Object>): boolean {
)
);
- const customToolbarButtons = params['config.customToolbarButtons'] ?? [];
-
- permanentProperties.overwritesCustomButtonsWithURL = Boolean(
- customToolbarButtons.find(({ icon }: { icon: string; }) => isDataURL(icon)));
+ permanentProperties.overwritesCustomButtonsWithURL = 'config.customToolbarButtons' in params;
// Optionally, include local deployment information based on the
// contents of window.config.deploymentInfo.