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

feat: support listBatchMessages (placeholder sequential) #45

Merged
merged 1 commit into from
May 26, 2023

Conversation

dmccartney
Copy link
Contributor

@dmccartney dmccartney commented May 26, 2023

This is a WIP toward implementing #34.

  • define listBatchMessages in RN JS
  • implement placeholder edition for iOS RN using sequential requests
  • implement placeholder for Android RN using sequential requests

To do in follow-up PRs

  • in Android SDK, support batchQuery so we can implement the performant edition in RN
  • in the rust + iOS SDK, ^ do the same thing ^

@dmccartney dmccartney force-pushed the daniel-batch-message-listing branch 2 times, most recently from 90d42fc to b099fee Compare May 26, 2023 21:38
@dmccartney dmccartney changed the title feat: support listBatchMessages feat: support listBatchMessages (placeholder sequential) May 26, 2023
@dmccartney dmccartney marked this pull request as ready for review May 26, 2023 21:45
@dmccartney dmccartney requested a review from a team as a code owner May 26, 2023 21:45
Copy link
Contributor

@nplasterer nplasterer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice to remove the logs in the long run. But looks good to me. 👍

@dmccartney dmccartney force-pushed the daniel-batch-message-listing branch from b099fee to 194cf95 Compare May 26, 2023 22:22
Comment on lines +353 to +355
if (isDebugEnabled) {
Log.v("XMTPModule", msg);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added this in response to #45 (review)

@dmccartney dmccartney merged commit 92913e7 into main May 26, 2023
@dmccartney dmccartney deleted the daniel-batch-message-listing branch May 26, 2023 22:24
@github-actions
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Comment on lines +167 to +171
.map {
it.messages(limit = limit, before = beforeDate, after = afterDate)
.map { DecodedMessageWrapper.encode(it) }
}
.flatten()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can actually do this with a flatMap in Kotlin https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/flat-map.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants