Skip to content

fix: deduplicate response in paginated messages #1210

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

Closed
wants to merge 2 commits into from

Conversation

alex-mcgovern
Copy link
Contributor

Fixes a minor nit in #1020 where multiple messages with the same chat_id were returned in the response from /v1/workspaces/:name/messages.

The root cause was in a while loop that continued to fetch more results until the number of records retrieved matched the page size. There was already a de-deduplication step in the wscrud method that retrieved the results, but due to the fixed size of the cursor, it wasn't able to fully de-duplicate the result.

@alex-mcgovern alex-mcgovern changed the base branch from main to issue-1020 March 4, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant