Skip to content

Migrate block/unblock user endpoints to generated models#6544

Draft
gpunto wants to merge 1 commit into
developfrom
migrate/block-unblock-users
Draft

Migrate block/unblock user endpoints to generated models#6544
gpunto wants to merge 1 commit into
developfrom
migrate/block-unblock-users

Conversation

@gpunto

@gpunto gpunto commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Goal

Migrate the /users/block and /users/unblock endpoints to generated request/response models. Part of the incremental OpenAPI model migration: generated models keep their generated package (io.getstream.chat.android.network.models) as internal classes inside the client module, one endpoint at a time.

Closes AND-1293

Implementation

  • Add generated BlockUsersRequest, BlockUsersResponse, UnblockUsersRequest, UnblockUsersResponse and delete the four hand-written DTOs.
  • Point UserApi, MoshiChatApi, and the toDomain() mapper at the generated types (real names, no import aliases), updating field access to the generated camelCase names.
  • queryBlockedUsers is left untouched (independent). Also fixes a pre-existing copy-paste where the unblock test argument used the block response type.

Testing

  • Project-wide spotlessApply, apiDump (no API drift), lint, detekt, and testDebugUnitTest all pass.
  • Verified on device: block a real user, confirm the id round-trips through request -> response (UserBlock), then unblock succeeds.

@gpunto gpunto added the pr:internal Internal changes / housekeeping label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.93 MB 5.93 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.20 MB 11.20 MB 0.00 MB 🟢
stream-chat-android-compose 12.66 MB 12.66 MB 0.00 MB 🟢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:internal Internal changes / housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant