-
Notifications
You must be signed in to change notification settings - Fork 21
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 #372
Conversation
@@ -110,24 +111,20 @@ export class Group< | |||
*/ | |||
async messages( | |||
skipSync: boolean = false, |
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.
Want to include skipSync in the options? You can do something like:
interface GroupMessagesOptions extends MessagesOptions {
skipSync?: boolean
}
And you can remove some duplicate code doing:
const {
skipSync = false
} = opts ?? {}
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'd be curious @cameronvoell thoughts here. He added skipSync all over the code base so I kind of felt like it belonged outside of the messageOptions as it's more of a conscious action. But I'm totally fine with moving it into the options if we're cool with that.
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.
For consistency with other functions I think it's slightly better to keep it as a parameter the way it is.
Right now feels like the optional skipSync is the least bad way I've heard for having developers be generally aware that libxmtp group functions only return results from local data, and require a sync first if you want latest from network. Open to other suggestions for sure. But if we do keep it, I think we might as well have it passed as a parameter in a consistent way across functions.
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.
looks good! left a comment with my suggestion for skipSync param
🎉 This PR is included in version 1.32.5-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.33.1-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Part of xmtp/libxmtp#516