mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Ensure sip.linphone.org accounts have a LIME X3DH server URL set in their params
This commit is contained in:
parent
2b17f94c2d
commit
4e89eedab7
2 changed files with 17 additions and 4 deletions
|
|
@ -453,10 +453,16 @@ class CoreContext(
|
|||
Log.i("[Context] CPIM allowed in basic chat rooms for account ${params.identityAddress?.asString()}")
|
||||
}
|
||||
|
||||
if (account.params.limeServerUrl == null && limeServerUrl.isNotEmpty()) {
|
||||
params.limeServerUrl = limeServerUrl
|
||||
paramsChanged = true
|
||||
Log.i("[Context] Moving Core's LIME X3DH server URL [$limeServerUrl] on account ${params.identityAddress?.asString()}")
|
||||
if (account.params.limeServerUrl.isNullOrEmpty()) {
|
||||
if (limeServerUrl.isNotEmpty()) {
|
||||
params.limeServerUrl = limeServerUrl
|
||||
paramsChanged = true
|
||||
Log.i("[Context] Moving Core's LIME X3DH server URL [$limeServerUrl] on account ${params.identityAddress?.asString()}")
|
||||
} else {
|
||||
params.limeServerUrl = corePreferences.limeServerUrl
|
||||
paramsChanged = true
|
||||
Log.w("[Context] Linphone account [${params.identityAddress?.asString()}] didn't have a LIME X3DH server URL, setting one: ${corePreferences.limeServerUrl}")
|
||||
}
|
||||
}
|
||||
|
||||
if (paramsChanged) {
|
||||
|
|
|
|||
|
|
@ -522,6 +522,13 @@ class CorePreferences constructor(private val context: Context) {
|
|||
"sip:videoconference-factory@sip.linphone.org"
|
||||
)!!
|
||||
|
||||
val limeServerUrl: String
|
||||
get() = config.getString(
|
||||
"app",
|
||||
"default_lime_server_url",
|
||||
"https://lime.linphone.org/lime-server/lime-server.php"
|
||||
)!!
|
||||
|
||||
val checkUpdateAvailableInterval: Int
|
||||
get() = config.getInt("app", "version_check_interval", 86400000)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue