Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Group Chat to Use Dev #173

Merged
merged 5 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading