Skip to content

Commit

Permalink
Merge pull request #124 from akwizgran/use-lowercase-for-moat-country…
Browse files Browse the repository at this point in the history
…-code

Use lowercase when specifying country code for moat API
  • Loading branch information
grote committed Mar 12, 2024
2 parents 32055c8 + 342646a commit e59f489
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/org/onionshare/android/tor/TorManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.onionshare.android.DefaultClock
import org.onionshare.android.ui.settings.SettingsManager
import org.slf4j.LoggerFactory.getLogger
import java.io.IOException
import java.util.Locale.US
import java.util.concurrent.TimeUnit.MINUTES
import javax.inject.Inject
import javax.inject.Singleton
Expand Down Expand Up @@ -265,7 +266,7 @@ class TorManager(
)
val bridges = moat.get().let {
// if response was empty, try it again with what we think the country should be
if (it.isEmpty()) moat.getWithCountry(locationUtils.currentCountry)
if (it.isEmpty()) moat.getWithCountry(locationUtils.currentCountry.lowercase(US))
else it
}
return bridges.flatMap { bridge ->
Expand Down

0 comments on commit e59f489

Please sign in to comment.