Repository navigation
feat: add redaction, direction and soft-delete exclusions to export users - #298
Merged
Merged
Conversation
…sers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
👋 Thanks, Yassine! I'm on it.How to work with me
CommandsComment any of these on the PR:
|
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-6826, CHA-6827
Problem
POST /export/usersgained five optional fields:redact_idsandredact_salt(GetStream/chat #22200)direction,exclude_soft_deleted_messagesandexclude_soft_deleted_channels(GetStream/chat #22244)ExportUsers.exportUserscan't send them:ExportUsersRequestDataonly hasuser_idsand the filters from #296.Solution
ExportUsersRequestgets five builder methods:redactIds(Boolean)andredactSalt(String)direction(String):"sent"(default) or"sent_and_received"excludeSoftDeletedMessages(Boolean)andexcludeSoftDeletedChannels(Boolean)Each is omitted when unset, so existing calls send the same request as before.
directionis a plainString, like other string options in this SDK.DOCS.mdgets an example.The server owns the rules:
redact_idsrequiresredact_salt(at most 255 characters) and exactly one user ID.redact_saltwithoutredact_idsis a 400.directionmust besentorsent_and_received.sent_and_receivedrequires exactly one user ID.exclude_soft_deleted_channelsdefaults to false. The channel export'sinclude_soft_deleted_channelshas the opposite default.Callers should only use these fields once the chat release with both server PRs is deployed. An older server ignores them.
How to verify
./gradlew test --tests '*ExportUsersFiltersTest*'passes: 3 tests, no API credentials needed. They assert the body carries all five new fields when set and is only{"user_ids":[...]}when unset. I ran it inamazoncorretto:11../gradlew spotlessApplymade no further changes.CLA
🤖 Generated with Claude Code
Note
Low Risk
Backward-compatible SDK surface and request serialization only; validation and export behavior remain on the server.
Overview
Extends
ExportUsers.exportUsersso the Java SDK can send five new optionalPOST /export/usersfields that the API already supports.ExportUsersRequestDatagains builder-backed options mapped with@JsonInclude(NON_NULL):redactIds/redactSaltfor deterministic placeholder IDs,direction(sentorsent_and_received), andexcludeSoftDeletedMessages/excludeSoftDeletedChannels. Unset values are omitted from the JSON body, so existing callers still emit onlyuser_ids(and any filters they already used).DOCS.mddocuments a single-user export example combining direction, redaction, and soft-delete flags.ExportUsersFiltersTestadds coverage that all five fields serialize correctly when set.Reviewed by Cursor Bugbot for commit 1321892. Bugbot is set up for automated code reviews on this repo. Configure here.