From 8652392d9f0fbd3d560573c039c4de5fab2cded4 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Sun, 10 Nov 2024 09:50:11 -0800 Subject: [PATCH 1/3] return sent at ns in the decoded message --- .../org/xmtp/android/library/DecodedMessage.kt | 15 +-------------- .../org/xmtp/android/library/libxmtp/Message.kt | 1 + 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/library/src/main/java/org/xmtp/android/library/DecodedMessage.kt b/library/src/main/java/org/xmtp/android/library/DecodedMessage.kt index dda478e8e..fa0358f48 100644 --- a/library/src/main/java/org/xmtp/android/library/DecodedMessage.kt +++ b/library/src/main/java/org/xmtp/android/library/DecodedMessage.kt @@ -1,6 +1,5 @@ package org.xmtp.android.library -import org.xmtp.android.library.codecs.TextCodec import org.xmtp.android.library.codecs.decoded import org.xmtp.android.library.libxmtp.Message.MessageDeliveryStatus import org.xmtp.proto.message.contents.Content @@ -13,21 +12,9 @@ data class DecodedMessage( var encodedContent: Content.EncodedContent, var senderAddress: String, var sent: Date, + var sentNs: Long, var deliveryStatus: MessageDeliveryStatus = MessageDeliveryStatus.PUBLISHED ) { - companion object { - fun preview(client: Client, topic: String, body: String, senderAddress: String, sent: Date): DecodedMessage { - val encoded = TextCodec().encode(content = body) - return DecodedMessage( - client = client, - topic = topic, - encodedContent = encoded, - senderAddress = senderAddress, - sent = sent - ) - } - } - fun content(): T? = encodedContent.decoded() diff --git a/library/src/main/java/org/xmtp/android/library/libxmtp/Message.kt b/library/src/main/java/org/xmtp/android/library/libxmtp/Message.kt index 0511e50f5..6374a211c 100644 --- a/library/src/main/java/org/xmtp/android/library/libxmtp/Message.kt +++ b/library/src/main/java/org/xmtp/android/library/libxmtp/Message.kt @@ -54,6 +54,7 @@ data class Message(val client: Client, private val libXMTPMessage: FfiMessage) { encodedContent = EncodedContent.parseFrom(libXMTPMessage.content), senderAddress = senderInboxId, sent = sentAt, + sentNs = sentAtNs, deliveryStatus = deliveryStatus ) if (decodedMessage.encodedContent.type == ContentTypeGroupUpdated && libXMTPMessage.kind != FfiConversationMessageKind.MEMBERSHIP_CHANGE) { From 59c4f53a311ba18b073f8bbd7bf496241bcebeaf Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Sun, 10 Nov 2024 10:32:26 -0800 Subject: [PATCH 2/3] dry run what the release number will be --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ac56c305..01967d6b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,8 @@ name: Release XMTP Android Package on: push: branches: - - release + - main + pull_request: jobs: library: @@ -27,7 +28,7 @@ jobs: uses: mathieudutour/github-tag-action@v6.1 with: release_branches: "release" - custom_tag: 3.0.1 + dry_run: true github_token: ${{ secrets.GITHUB_TOKEN }} - name: Create a GitHub release uses: ncipollo/release-action@v1 From eb23be72c36014563bc0a9921e8dee66d9392e90 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Sun, 10 Nov 2024 10:41:39 -0800 Subject: [PATCH 3/3] confirm dry run ran correctly --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01967d6b8..2a4545dc9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,7 @@ name: Release XMTP Android Package on: push: branches: - - main - pull_request: + - release jobs: library: @@ -28,7 +27,6 @@ jobs: uses: mathieudutour/github-tag-action@v6.1 with: release_branches: "release" - dry_run: true github_token: ${{ secrets.GITHUB_TOKEN }} - name: Create a GitHub release uses: ncipollo/release-action@v1