From 2994430b884fe2e02696fff8080b9be1e309e6b8 Mon Sep 17 00:00:00 2001 From: Sedat Qaja Date: Thu, 16 Jul 2026 10:58:07 +0200 Subject: [PATCH] feat(branding): rebrand app identity to HealthChat App id ch.healthchat.element, locked matrix.healthchat.ch homeserver. --- .../android/appconfig/ApplicationConfig.kt | 4 ++-- .../impl/DefaultEnterpriseService.kt | 2 +- .../impl/DefaultEnterpriseServiceTest.kt | 4 ++-- .../src/main/kotlin/config/BuildTimeConfig.kt | 21 ++++++++++++------- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/appconfig/src/main/kotlin/io/element/android/appconfig/ApplicationConfig.kt b/appconfig/src/main/kotlin/io/element/android/appconfig/ApplicationConfig.kt index e1ae6896bb..2e2208814c 100644 --- a/appconfig/src/main/kotlin/io/element/android/appconfig/ApplicationConfig.kt +++ b/appconfig/src/main/kotlin/io/element/android/appconfig/ApplicationConfig.kt @@ -24,12 +24,12 @@ object ApplicationConfig { * Cannot be empty. * For Element, the value is "Element". */ - const val PRODUCTION_APPLICATION_NAME: String = "Element" + const val PRODUCTION_APPLICATION_NAME: String = "HealthChat" /** * Used in the strings to reference the Element Desktop client, for instance Element Web. * Cannot be empty. * For Element, the value is "Element". We use the same name for desktop and mobile for now. */ - const val DESKTOP_APPLICATION_NAME: String = "Element" + const val DESKTOP_APPLICATION_NAME: String = "HealthChat" } diff --git a/features/enterprise/impl-foss/src/main/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseService.kt b/features/enterprise/impl-foss/src/main/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseService.kt index 6e3ed5d3cc..795b817831 100644 --- a/features/enterprise/impl-foss/src/main/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseService.kt +++ b/features/enterprise/impl-foss/src/main/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseService.kt @@ -24,7 +24,7 @@ class DefaultEnterpriseService : EnterpriseService { override suspend fun isEnterpriseUser(sessionId: SessionId) = false override suspend fun tweakMasUrl(url: String, homeserver: String) = url - override fun defaultHomeserverList(): List = emptyList() + override fun defaultHomeserverList(): List = listOf("matrix.healthchat.ch") override suspend fun isAllowedToConnectToHomeserver(homeserverUrl: String) = true override suspend fun overrideBrandColor(sessionId: SessionId?, brandColor: String?) = Unit diff --git a/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt b/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt index 2bee3f8b4d..80bc64008f 100644 --- a/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt +++ b/features/enterprise/impl-foss/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt @@ -25,9 +25,9 @@ class DefaultEnterpriseServiceTest { } @Test - fun `defaultHomeserverList should return empty list`() { + fun `defaultHomeserverList should return the HealthChat homeserver only`() { val defaultEnterpriseService = DefaultEnterpriseService() - assertThat(defaultEnterpriseService.defaultHomeserverList()).isEmpty() + assertThat(defaultEnterpriseService.defaultHomeserverList()).containsExactly("matrix.healthchat.ch") } @Test diff --git a/plugins/src/main/kotlin/config/BuildTimeConfig.kt b/plugins/src/main/kotlin/config/BuildTimeConfig.kt index 8cfa533609..87221bbfcc 100644 --- a/plugins/src/main/kotlin/config/BuildTimeConfig.kt +++ b/plugins/src/main/kotlin/config/BuildTimeConfig.kt @@ -9,19 +9,24 @@ package config object BuildTimeConfig { - const val APPLICATION_ID = "io.element.android.x" - const val APPLICATION_NAME = "Element X" + const val APPLICATION_ID = "ch.healthchat.element" + const val APPLICATION_NAME = "HealthChat" const val GOOGLE_APP_ID_RELEASE = "1:912726360885:android:d097de99a4c23d2700427c" const val GOOGLE_APP_ID_DEBUG = "1:912726360885:android:def0a4e454042e9b00427c" const val GOOGLE_APP_ID_NIGHTLY = "1:912726360885:android:e17435e0beb0303000427c" - val METADATA_HOST_REVERSED: String? = null - val URL_WEBSITE: String? = null - val URL_LOGO: String? = null + // OIDC redirect scheme base. MAS requires the custom scheme to be the + // reverse-DNS of the CLIENT_URI (URL_WEBSITE) host, or an extension of it. + val METADATA_HOST_REVERSED: String? = "ch.healthchat.element" + // Must stay the apex host: the OIDC client_uri host must reverse-match + // METADATA_HOST_REVERSED, and logo/tos/policy URIs must be on this host + // or a subdomain of it. + val URL_WEBSITE: String? = "https://healthchat.ch" + val URL_LOGO: String? = "https://www.healthchat.ch/favicon.ico" val URL_COPYRIGHT: String? = null - val URL_ACCEPTABLE_USE: String? = null - val URL_PRIVACY: String? = null - val URL_POLICY: String? = null + val URL_ACCEPTABLE_USE: String? = "https://www.healthchat.ch/datenschutz" + val URL_PRIVACY: String? = "https://www.healthchat.ch/datenschutz" + val URL_POLICY: String? = "https://www.healthchat.ch/datenschutz" val SERVICES_MAPTILER_BASE_URL: String? = null val SERVICES_MAPTILER_APIKEY: String? = null val SERVICES_MAPTILER_LIGHT_MAPID: String? = null