fix(config): cleanup config function (#12690)

* fix(config): avoid cleaning analytics config

* fix cleanup function
This commit is contained in:
Gabriel Borlea 2022-12-15 18:00:22 +02:00 committed by GitHub
parent c30d1e7479
commit 955367a157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -15,11 +15,18 @@ export * from './functions.any';
* @returns {void}
*/
export function _cleanupConfig(config: IConfig) {
config.analytics = {};
config.analytics = config.analytics ?? {};
config.analytics.scriptURLs = [];
if (NativeModules.AppInfo.LIBRE_BUILD) {
delete config.analytics?.amplitudeAPPKey;
delete config.analytics?.googleAnalyticsTrackingId;
delete config.analytics?.rtcstatsEnabled;
delete config.analytics?.rtcstatsEndpoint;
delete config.analytics?.rtcstatsPollInterval;
delete config.analytics?.rtcstatsSendSdp;
delete config.analytics?.rtcstatsUseLegacy;
delete config.analytics?.obfuscateRoomName;
delete config.callStatsID;
delete config.callStatsSecret;
config.giphy = { enabled: false };