Commit a6c52ad9 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Handling a case where the "clientId" is not present (but it is "appId" on old servers).

parent b67c3726
......@@ -280,9 +280,9 @@ class LoginPresenter @Inject constructor(
}
private fun getOauthClientId(listMap: List<Map<String, Any>>, serviceName: String): String? {
return listMap.find { map -> map.containsValue(serviceName) }
?.get("clientId")
.toString()
return listMap.find { map -> map.containsValue(serviceName) }?.let {
it["clientId"] ?: it["appId"]
}.toString()
}
private suspend fun saveAccount(username: String) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment