From e7c9ac86d4b98c106f2dc7282b475d40f0b443cc Mon Sep 17 00:00:00 2001 From: enki Date: Sun, 26 Jul 2026 13:50:15 -0700 Subject: [PATCH] Rip out Element telemetry Upstream's non-enterprise build hardcoded Posthog+Sentry providers into the APK (opt-in prompt, Element endpoints). Analytics is now always AnalyticsConfig.Disabled: the no-op service compiles in, the provider modules never enter the dependency graph. --- plugins/src/main/kotlin/ModulesConfig.kt | 28 +++++------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/plugins/src/main/kotlin/ModulesConfig.kt b/plugins/src/main/kotlin/ModulesConfig.kt index b5360b42ca..19c9ef5a64 100644 --- a/plugins/src/main/kotlin/ModulesConfig.kt +++ b/plugins/src/main/kotlin/ModulesConfig.kt @@ -16,27 +16,9 @@ object ModulesConfig { includeUnifiedPush = BuildTimeConfig.PUSH_CONFIG_INCLUDE_UNIFIED_PUSH, ) - val analyticsConfig: AnalyticsConfig = if (isEnterpriseBuild) { - // Is Posthog configuration available? - val withPosthog = BuildTimeConfig.SERVICES_POSTHOG_APIKEY.isNullOrEmpty().not() && - BuildTimeConfig.SERVICES_POSTHOG_HOST.isNullOrEmpty().not() - // Is Sentry configuration available? - val withSentry = BuildTimeConfig.SERVICES_SENTRY_DSN.isNullOrEmpty().not() - if (withPosthog || withSentry) { - println("Analytics enabled with Posthog: $withPosthog, Sentry: $withSentry") - AnalyticsConfig.Enabled( - withPosthog = withPosthog, - withSentry = withSentry, - ) - } else { - println("Analytics disabled") - AnalyticsConfig.Disabled - } - } else { - println("Analytics enabled with Posthog and Sentry") - AnalyticsConfig.Enabled( - withPosthog = true, - withSentry = true, - ) - } + // Blap: telemetry ripped out. Upstream's non-enterprise branch hardcoded + // Posthog+Sentry ON (Element's endpoints compiled into the APK, opt-in prompt + // at onboarding). Blap always builds the no-op analytics service instead — + // the provider modules never enter the dependency graph. + val analyticsConfig: AnalyticsConfig = AnalyticsConfig.Disabled }