Skip to content

Commit 94994da

Browse files
committed
a few small tweaks
1 parent ada12f4 commit 94994da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example/src/main/java/org/xmtp/android/example/ClientManager.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object ClientManager {
2020
api = ClientOptions.Api(
2121
XMTPEnvironment.DEV,
2222
appVersion = "XMTPAndroidExample/v1.0.0",
23-
isSecure = false
23+
isSecure = true
2424
),
2525
enableAlphaMls = true,
2626
appContext = appContext

library/src/main/java/org/xmtp/android/library/Client.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class Client() {
279279
}
280280

281281
private fun isAlphaMlsEnabled(options: ClientOptions?): Boolean {
282-
return (options != null && options.enableAlphaMls && options.api.env == XMTPEnvironment.LOCAL && options.appContext != null)
282+
return (options != null && options.enableAlphaMls && options.api.env != XMTPEnvironment.PRODUCTION && options.appContext != null)
283283
}
284284

285285
private suspend fun ffiXmtpClient(
@@ -324,8 +324,8 @@ class Client() {
324324

325325
createClient(
326326
logger = logger,
327-
host = "http://${options.api.env.getValue()}:5556",
328-
isSecure = false,
327+
host = if (options.api.env == XMTPEnvironment.LOCAL) "http://${options.api.env.getValue()}:5556" else "https://${options.api.env.getValue()}:443",
328+
isSecure = options.api.isSecure,
329329
db = dbPath,
330330
encryptionKey = retrievedKey.encoded,
331331
accountAddress = accountAddress,

0 commit comments

Comments
 (0)