Add default OAUTH_CLIENT_URL_PATH alternative (#7385)

* Add default `OAUTH_CLIENT_URL_PATH` alternative

Previously this was `null`, but we want to use `apps/android` instead to identify Element X Android. Element Pro will use a different value, and other custom apps based on EP will use `null` or their own custom value, if they provided one

* Suppress lint check so the pro app can be built
This commit is contained in:
Jorge Martin Espinosa
2026-08-10 16:16:14 +02:00
committed by GitHub
parent 481407329f
commit cb3b9e7946
2 changed files with 3 additions and 1 deletions
@@ -11,6 +11,8 @@ package io.element.android.libraries.matrix.api.auth
import io.element.android.libraries.matrix.api.BuildConfig
object OAuthConfig {
// This *can* be null if the build time config field is not set
@Suppress("UNNECESSARY_SAFE_CALL")
val CLIENT_URI = BuildConfig.OAUTH_CLIENT_URI_PATH?.let {
// Concatenate the base URI and the path, ensuring there is exactly one '/' between them
"${BuildConfig.CLIENT_URI.trimEnd('/')}/${it.trimStart('/')}"
@@ -22,7 +22,7 @@ object BuildTimeConfig {
val URL_ACCEPTABLE_USE: String? = null
val URL_PRIVACY: String? = null
val URL_POLICY: String? = null
val OAUTH_CLIENT_URL_PATH: String? = null
val OAUTH_CLIENT_URL_PATH: String? = "apps/android"
val SERVICES_MAPTILER_BASE_URL: String? = null
val SERVICES_MAPTILER_APIKEY: String? = null
val SERVICES_MAPTILER_LIGHT_MAPID: String? = null