Skip to content

Commit

Permalink
feat: Update the bindings and add the default message sync url (#284)
Browse files Browse the repository at this point in the history
* update the bindings and add the default message sync url

* switch on env for message history

* feat: fix linter
  • Loading branch information
nplasterer authored Aug 7, 2024
1 parent 5ba480d commit d88ac68
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 47 deletions.
2 changes: 2 additions & 0 deletions library/src/main/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ Kotlin code emitted by the `bindings_ffi` crate in [libxmtp](https://github.com/
4. Navigate to the [latest release](https://github.com/xmtp/libxmtp/releases) once the action completes
5. Download the `LibXMTPKotlinFFI.zip` assets
6. Unzip and then copy the jniLibs to `xmtp-android/library/src/main/jniLibs`
7. All instances of `value.forEach` should be changed to `value.iterator().forEach` to be compatible with API 23
8. NOTE: sometimes the library name gets updated and will cause failures the library name must be `uniffi_xmtpv3` not `xmtpv3` -- search for `findLibraryName` and make sure the correct name is returned.

You should now be on the latest libxmtp. Tests will fail if the jniLibs do not match the version of xmtpv3.
4 changes: 2 additions & 2 deletions library/src/main/java/libxmtp-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 7d414613
Version: 340b0b68
Branch: main
Date: 2024-08-07 00:18:12 +0000
Date: 2024-08-07 17:24:24 +0000
6 changes: 5 additions & 1 deletion library/src/main/java/org/xmtp/android/library/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ data class ClientOptions(
val enableV3: Boolean = false,
val dbDirectory: String? = null,
val dbEncryptionKey: ByteArray? = null,
val historySyncUrl: String? = null,
val historySyncUrl: String = when (api.env) {
XMTPEnvironment.PRODUCTION -> "https://message-history.production.ephemera.network/"
XMTPEnvironment.LOCAL -> "http://0.0.0.0:5558"
else -> "https://message-history.dev.ephemera.network/"
},
) {
data class Api(
val env: XMTPEnvironment = XMTPEnvironment.DEV,
Expand Down
Loading

0 comments on commit d88ac68

Please sign in to comment.