-
Notifications
You must be signed in to change notification settings - Fork 14
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
Group message delivery status #232
Conversation
@@ -12,6 +13,7 @@ data class DecodedMessage( | |||
var encodedContent: Content.EncodedContent, | |||
var senderAddress: String, | |||
var sent: Date, | |||
var deliveryStatus: MessageDeliveryStatus = MessageDeliveryStatus.PUBLISHED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
V2 messages default to published.
@@ -330,9 +331,11 @@ class GroupTest { | |||
fun testCanSendMessageToGroup() { | |||
val group = runBlocking { boClient.conversations.newGroup(listOf(alix.walletAddress)) } | |||
runBlocking { group.send("howdy") } | |||
runBlocking { group.send("gm") } | |||
val messageId = runBlocking { group.send("gm") } | |||
runBlocking { group.sync() } | |||
assertEquals(group.messages().first().body, "gm") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that the group.send("gm")
was here prior and now grabbing the messageId
. However, I'm confused by how the subsequent equality test passed in the first place. Wouldn't this be the second message in the group? Asking to understand rather than request changes. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The messages come in descending order by default since the last message is the first message you want to see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow! That's great to know. Thanks for sharing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature addition to the SDK! 🚀
Part of xmtp/libxmtp#516