Repository navigation
feat: add channel and time filters to export users - #296
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
/jeffery review |
|
Thanks for asking Jeffery for review. I'll stay on this PR until I can approve it. How it works
Commands (each as a whole comment)
|
yaziine
enabled auto-merge (squash)
November 30, 2026 13:18
This was referenced Nov 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
CHA-6825
Problem
POST /export/usersgained three optional filters (GetStream/chat #21994):channel_cids,messages_fromandmessages_to. They limit an export to some channels and a time window, for legal holds.ExportUsers.exportUserscannot send them:ExportUsersRequestDataonly hasuser_ids.Solution
ExportUsersRequestgetschannelCids(List<String>),messagesFrom(Date)andmessagesTo(Date), sent aschannel_cids,messages_fromandmessages_to. Each is omitted when unset, so existing calls send the same request as before. Dates areDate, likemessagesSinceon channel export.DOCS.mdgets an example.The server owns the rules:
channel_cids: at most 100 well-formed CIDs; an empty list is a 400.messages_fromis inclusive,messages_tois exclusive, andmessages_tomust be aftermessages_from(otherwise 400).How to verify
./gradlew test --tests '*ExportUsersFiltersTest*'passes (2 tests, no API credentials needed). They assert the body carries all three fields when set and is only{"user_ids":[...]}when unset../gradlew spotlessCheckpasses.CLA
🤖 Generated with Claude Code
Note
Low Risk
Additive SDK surface with backward-compatible serialization; scope is limited to export request bodies and tests.
Overview
Adds optional channel and time-window filters to
ExportUsers.exportUsers, matching newPOST /export/usersparameters for legal-hold style exports.The request builder now supports
channelCids,messagesFrom, andmessagesTo(serialized aschannel_cids,messages_from,messages_to). Unset fields are omitted via@JsonInclude(NON_NULL), so existing integrations keep sending onlyuser_ids.DOCS.mddocuments usage and server-side semantics (inclusive/exclusive bounds, reaction timing, calls omitted when any filter is set).ExportUsersFiltersTestasserts JSON serialization when filters are set vs. omitted (no live API calls).Reviewed by Cursor Bugbot for commit 36d71d3. Bugbot is set up for automated code reviews on this repo. Configure here.