diff --git a/library/src/androidTest/java/org/xmtp/android/library/GroupTest.kt b/library/src/androidTest/java/org/xmtp/android/library/GroupTest.kt index d14b55b53..3182c6196 100644 --- a/library/src/androidTest/java/org/xmtp/android/library/GroupTest.kt +++ b/library/src/androidTest/java/org/xmtp/android/library/GroupTest.kt @@ -514,8 +514,7 @@ class GroupTest { } assertEquals(group.messages().size, 3) - assertEquals(group.messages(deliveryStatus = MessageDeliveryStatus.UNPUBLISHED).size, 2) - assertEquals(group.messages(deliveryStatus = MessageDeliveryStatus.PUBLISHED).size, 1) + assertEquals(group.messages(deliveryStatus = MessageDeliveryStatus.PUBLISHED).size, 3) runBlocking { group.sync() } assertEquals(group.messages().size, 3) assertEquals(group.messages(deliveryStatus = MessageDeliveryStatus.UNPUBLISHED).size, 0) diff --git a/library/src/main/java/libxmtp-version.txt b/library/src/main/java/libxmtp-version.txt index f2d59ae54..e66634cfc 100644 --- a/library/src/main/java/libxmtp-version.txt +++ b/library/src/main/java/libxmtp-version.txt @@ -1,3 +1,3 @@ -Version: 4a572e8a +Version: 3df528b5 Branch: main -Date: 2024-07-23 15:16:12 +0000 +Date: 2024-07-25 22:27:46 +0000 diff --git a/library/src/main/java/xmtpv3.kt b/library/src/main/java/xmtpv3.kt index 63445eb5c..e97424bc0 100644 --- a/library/src/main/java/xmtpv3.kt +++ b/library/src/main/java/xmtpv3.kt @@ -264,7 +264,7 @@ interface UniffiRustCallStatusErrorHandler { // Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err private inline fun uniffiRustCallWithError( errorHandler: UniffiRustCallStatusErrorHandler, - callback: (UniffiRustCallStatus) -> U + callback: (UniffiRustCallStatus) -> U, ): U { var status = UniffiRustCallStatus(); val return_value = callback(status) @@ -275,7 +275,7 @@ private inline fun uniffiRustCallWithError( // Check UniffiRustCallStatus and throw an error if the call wasn't successful private fun uniffiCheckCallStatus( errorHandler: UniffiRustCallStatusErrorHandler, - status: UniffiRustCallStatus + status: UniffiRustCallStatus, ) { if (status.isSuccess()) { return @@ -325,7 +325,7 @@ internal inline fun uniffiTraitInterfaceCallWithError callStatus: UniffiRustCallStatus, makeCall: () -> T, writeReturn: (T) -> Unit, - lowerError: (E) -> RustBuffer.ByValue + lowerError: (E) -> RustBuffer.ByValue, ) { try { writeReturn(makeCall()) @@ -380,7 +380,7 @@ private fun findLibraryName(componentName: String): String { } private inline fun loadIndirect( - componentName: String + componentName: String, ): Lib { return Native.load(findLibraryName(componentName), Lib::class.java) } @@ -2210,7 +2210,7 @@ internal suspend fun uniffiRustCallAsync( completeFunc: (Long, UniffiRustCallStatus) -> F, freeFunc: (Long) -> Unit, liftFunc: (F) -> T, - errorHandler: UniffiRustCallStatusErrorHandler + errorHandler: UniffiRustCallStatusErrorHandler, ): T { try { do { @@ -2594,7 +2594,7 @@ private class JavaLangRefCleaner : UniffiCleaner { } private class JavaLangRefCleanable( - val cleanable: java.lang.ref.Cleaner.Cleanable + val cleanable: java.lang.ref.Cleaner.Cleanable, ) : UniffiCleaner.Cleanable { override fun clean() = cleanable.clean() } @@ -2603,7 +2603,7 @@ public interface FfiConversationsInterface { suspend fun `createGroup`( `accountAddresses`: List, - `opts`: FfiCreateGroupOptions + `opts`: FfiCreateGroupOptions, ): FfiGroup suspend fun `list`(`opts`: FfiListConversationsOptions): List @@ -2705,7 +2705,7 @@ open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterfa @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `createGroup`( `accountAddresses`: List, - `opts`: FfiCreateGroupOptions + `opts`: FfiCreateGroupOptions, ): FfiGroup { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -3103,7 +3103,7 @@ public interface FfiGroupInterface { suspend fun `updatePermissionPolicy`( `permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, - `metadataField`: FfiMetadataField? + `metadataField`: FfiMetadataField?, ) companion object @@ -3995,7 +3995,7 @@ open class FfiGroup : Disposable, AutoCloseable, FfiGroupInterface { override suspend fun `updatePermissionPolicy`( `permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, - `metadataField`: FfiMetadataField? + `metadataField`: FfiMetadataField?, ) { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -4655,7 +4655,7 @@ public interface FfiSignatureRequestInterface { suspend fun `addScwSignature`( `signatureBytes`: kotlin.ByteArray, `address`: kotlin.String, - `chainRpcUrl`: kotlin.String + `chainRpcUrl`: kotlin.String, ) suspend fun `isReady`(): kotlin.Boolean @@ -4790,7 +4790,7 @@ open class FfiSignatureRequest : Disposable, AutoCloseable, FfiSignatureRequestI override suspend fun `addScwSignature`( `signatureBytes`: kotlin.ByteArray, `address`: kotlin.String, - `chainRpcUrl`: kotlin.String + `chainRpcUrl`: kotlin.String, ) { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -5352,7 +5352,7 @@ public interface FfiV2ApiClientInterface { suspend fun `subscribe`( `request`: FfiV2SubscribeRequest, - `callback`: FfiV2SubscriptionCallback + `callback`: FfiV2SubscriptionCallback, ): FfiV2Subscription companion object @@ -5551,7 +5551,7 @@ open class FfiV2ApiClient : Disposable, AutoCloseable, FfiV2ApiClientInterface { @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribe`( `request`: FfiV2SubscribeRequest, - `callback`: FfiV2SubscriptionCallback + `callback`: FfiV2SubscriptionCallback, ): FfiV2Subscription { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -6046,7 +6046,7 @@ public interface FfiXmtpClientInterface { */ suspend fun `addWallet`( `existingWalletAddress`: kotlin.String, - `newWalletAddress`: kotlin.String + `newWalletAddress`: kotlin.String, ): FfiSignatureRequest suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest) @@ -6172,7 +6172,7 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addWallet`( `existingWalletAddress`: kotlin.String, - `newWalletAddress`: kotlin.String + `newWalletAddress`: kotlin.String, ): FfiSignatureRequest { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -6560,7 +6560,7 @@ data class FfiCreateGroupOptions( var `groupImageUrlSquare`: kotlin.String?, var `groupDescription`: kotlin.String?, var `groupPinnedFrameUrl`: kotlin.String?, - var `customPermissionPolicySet`: FfiPermissionPolicySet? + var `customPermissionPolicySet`: FfiPermissionPolicySet?, ) { companion object @@ -6601,7 +6601,7 @@ public object FfiConverterTypeFfiCreateGroupOptions : data class FfiCursor( var `digest`: kotlin.ByteArray, - var `senderTimeNs`: kotlin.ULong + var `senderTimeNs`: kotlin.ULong, ) { companion object @@ -6630,7 +6630,7 @@ public object FfiConverterTypeFfiCursor : FfiConverterRustBuffer { data class FfiEnvelope( var `contentTopic`: kotlin.String, var `timestampNs`: kotlin.ULong, - var `message`: kotlin.ByteArray + var `message`: kotlin.ByteArray, ) { companion object @@ -6663,7 +6663,7 @@ data class FfiGroupMember( var `inboxId`: kotlin.String, var `accountAddresses`: List, var `installationIds`: List, - var `permissionLevel`: FfiPermissionLevel + var `permissionLevel`: FfiPermissionLevel, ) { companion object @@ -6698,7 +6698,7 @@ public object FfiConverterTypeFfiGroupMember : FfiConverterRustBuffer { data class FfiPagingInfo( var `limit`: kotlin.UInt, var `cursor`: FfiCursor?, - var `direction`: FfiSortDirection + var `direction`: FfiSortDirection, ) { companion object @@ -6853,7 +6853,7 @@ data class FfiPermissionPolicySet( var `updateGroupNamePolicy`: FfiPermissionPolicy, var `updateGroupDescriptionPolicy`: FfiPermissionPolicy, var `updateGroupImageUrlSquarePolicy`: FfiPermissionPolicy, - var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy + var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy, ) { companion object @@ -6899,7 +6899,7 @@ public object FfiConverterTypeFfiPermissionPolicySet : data class FfiPublishRequest( - var `envelopes`: List + var `envelopes`: List, ) { companion object @@ -6923,7 +6923,7 @@ public object FfiConverterTypeFfiPublishRequest : FfiConverterRustBuffer + var `requests`: List, ) { companion object @@ -6948,7 +6948,7 @@ public object FfiConverterTypeFfiV2BatchQueryRequest : data class FfiV2BatchQueryResponse( - var `responses`: List + var `responses`: List, ) { companion object @@ -6976,7 +6976,7 @@ data class FfiV2QueryRequest( var `contentTopics`: List, var `startTimeNs`: kotlin.ULong, var `endTimeNs`: kotlin.ULong, - var `pagingInfo`: FfiPagingInfo? + var `pagingInfo`: FfiPagingInfo?, ) { companion object @@ -7010,7 +7010,7 @@ public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer, - var `pagingInfo`: FfiPagingInfo? + var `pagingInfo`: FfiPagingInfo?, ) { companion object @@ -7037,7 +7037,7 @@ public object FfiConverterTypeFfiV2QueryResponse : FfiConverterRustBuffer + var `contentTopics`: List, ) { companion object @@ -8268,7 +8268,7 @@ suspend fun `createClient`( `accountAddress`: kotlin.String, `nonce`: kotlin.ULong, `legacySignedPrivateKeyProto`: kotlin.ByteArray?, - `historySyncUrl`: kotlin.String? + `historySyncUrl`: kotlin.String?, ): FfiXmtpClient { return uniffiRustCallAsync( UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_client( @@ -8338,7 +8338,7 @@ suspend fun `createV2Client`(`host`: kotlin.String, `isSecure`: kotlin.Boolean): @Throws(GenericException::class) fun `diffieHellmanK256`( `privateKeyBytes`: kotlin.ByteArray, - `publicKeyBytes`: kotlin.ByteArray + `publicKeyBytes`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -8382,7 +8382,7 @@ suspend fun `getInboxIdForAddress`( `logger`: FfiLogger, `host`: kotlin.String, `isSecure`: kotlin.Boolean, - `accountAddress`: kotlin.String + `accountAddress`: kotlin.String, ): kotlin.String? { return uniffiRustCallAsync( UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_inbox_id_for_address( @@ -8450,7 +8450,7 @@ fun `publicKeyFromPrivateKeyK256`(`privateKeyBytes`: kotlin.ByteArray): kotlin.B @Throws(GenericException::class) fun `recoverAddress`( `signatureBytes`: kotlin.ByteArray, - `predigestMessage`: kotlin.String + `predigestMessage`: kotlin.String, ): kotlin.String { return FfiConverterString.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -8467,7 +8467,7 @@ fun `recoverAddress`( @Throws(GenericException::class) fun `recoverPublicKeyK256Keccak256`( `message`: kotlin.ByteArray, - `signature`: kotlin.ByteArray + `signature`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -8484,7 +8484,7 @@ fun `recoverPublicKeyK256Keccak256`( @Throws(GenericException::class) fun `recoverPublicKeyK256Sha256`( `message`: kotlin.ByteArray, - `signature`: kotlin.ByteArray + `signature`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -8512,7 +8512,7 @@ fun `sha256`(`input`: kotlin.ByteArray): kotlin.ByteArray { fun `userPreferencesDecrypt`( `publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, - `message`: kotlin.ByteArray + `message`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -8531,7 +8531,7 @@ fun `userPreferencesDecrypt`( fun `userPreferencesEncrypt`( `publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, - `message`: kotlin.ByteArray + `message`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -8551,7 +8551,7 @@ fun `verifyK256Sha256`( `signedBy`: kotlin.ByteArray, `message`: kotlin.ByteArray, `signature`: kotlin.ByteArray, - `recoveryId`: kotlin.UByte + `recoveryId`: kotlin.UByte, ): kotlin.Boolean { return FfiConverterBoolean.lift( uniffiRustCallWithError(GenericException) { _status -> diff --git a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so index 2a84e6ca1..a5f23aef4 100644 Binary files a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so differ diff --git a/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so index f7a7510b9..8b274636f 100644 Binary files a/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so differ diff --git a/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so b/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so index f7911d36f..41823c289 100644 Binary files a/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so differ diff --git a/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so b/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so index 766e033e3..0a274f476 100644 Binary files a/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so differ