Skip to content

Commit

Permalink
Update Group Chat to Use Dev (#173)
Browse files Browse the repository at this point in the history
* update the links in android

* try to fix releases

* point to dev

* update the links to correctly access the ports

* a few small tweaks
  • Loading branch information
nplasterer authored Feb 6, 2024
1 parent 1180190 commit 165f2b2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run build with Gradle Wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ object ClientManager {
fun clientOptions(appContext: Context?): ClientOptions {
return ClientOptions(
api = ClientOptions.Api(
XMTPEnvironment.LOCAL,
XMTPEnvironment.DEV,
appVersion = "XMTPAndroidExample/v1.0.0",
isSecure = false
isSecure = true
),
enableAlphaMls = true,
appContext = appContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ data class GRPCApiClient(
private val channel: ManagedChannel =
Grpc.newChannelBuilderForAddress(
environment.getValue(),
5556,
if (environment == XMTPEnvironment.LOCAL) 5556 else 443,
if (secure) {
TlsChannelCredentials.create()
} else {
Expand Down
6 changes: 3 additions & 3 deletions library/src/main/java/org/xmtp/android/library/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class Client() {
}

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

private suspend fun ffiXmtpClient(
Expand Down Expand Up @@ -324,8 +324,8 @@ class Client() {

createClient(
logger = logger,
host = "http://${options.api.env.getValue()}:5556",
isSecure = false,
host = if (options.api.env == XMTPEnvironment.LOCAL) "http://${options.api.env.getValue()}:5556" else "https://${options.api.env.getValue()}:443",
isSecure = options.api.isSecure,
db = dbPath,
encryptionKey = retrievedKey.encoded,
accountAddress = accountAddress,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.xmtp.android.library

enum class XMTPEnvironment(val rawValue: String) {
DEV("dev.xmtp.network"),
PRODUCTION("production.xmtp.network"),
DEV("grpc.dev.xmtp.network"),
PRODUCTION("grpc.production.xmtp.network"),
LOCAL("10.0.2.2") {
override fun withValue(value: String): XMTPEnvironment {
return LOCAL.apply { customValue = value }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This example branch can serve as the basis for what you might want to provide fo
--xmtp-listener-tls \
--xmtp-listener \
--api \
-x "production.xmtp.network:5556" \
-x "grpc.production.xmtp.network:443:5556" \
-d "postgres://postgres:xmtp@localhost:25432/postgres?sslmode=disable" \
--fcm-enabled \
--fcm-credentials-json=YOURFCMJSON \
Expand Down

0 comments on commit 165f2b2

Please sign in to comment.