Skip to content

Migrate channel update and member request bodies to the generated UpdateChannelRequest model - #6629

Closed
gpunto wants to merge 1 commit into
developfrom
migrate/channel-members
Closed

Migrate channel update and member request bodies to the generated UpdateChannelRequest model#6629
gpunto wants to merge 1 commit into
developfrom
migrate/channel-members

Conversation

@gpunto

@gpunto gpunto commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Goal

Migrate the channel update and member request bodies to the generated UpdateChannelRequest model.

Part of AND-1291

Implementation

  • Replace six hand-written request bodies with the single generated UpdateChannelRequest:
    AcceptInviteRequest, RejectInviteRequest, AddMembersRequest, RemoveMembersRequest,
    InviteMembersRequest and the old UpdateChannelRequest. The endpoint takes one shape, so the
    separate wrappers collapse into it.
  • Add the generated MessageRequest, ChannelInputRequest, ChannelMemberRequest, Attachment,
    Action, Field, Images, ImageData, SharedLocation, ConfigOverridesRequest and UserResponse.
  • Add Message.toMessageRequest() for the system message these endpoints can carry, plus
    MessageRequestAdapter, AttachmentRequestAdapter, ChannelMemberRequestAdapter and
    ChannelInputRequestAdapter so custom data is flattened to the root on the way out.

Testing

  • UpdateChannelRequestAdapterTest covers the serialized body for each of the collapsed calls, including
    the flattened custom data.
  • Device-probed the member and invite endpoints on the wire.

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

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

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.96 MB 6.00 MB 0.03 MB 🟢
stream-chat-android-ui-components 11.26 MB 11.29 MB 0.03 MB 🟢
stream-chat-android-compose 12.74 MB 12.78 MB 0.04 MB 🟢

@gpunto
gpunto force-pushed the migrate/channel-members branch from 2cf3baa to 4ba4272 Compare August 11, 2026 14:13
@gpunto
gpunto force-pushed the migrate/channel-members branch from 4ba4272 to e114121 Compare August 11, 2026 14:21
@gpunto

gpunto commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Parking this until the OpenAPI spec generator is fixed.

monolith/openapi/spec/spec.go maps Go float64 to format: float in SchemaFormatFromReflectType, so SharedLocation.latitude/longitude are generated as 32-bit Float even though the backend stores float64. This branch would narrow those coordinates and lose sub-meter GPS precision compared to the hand-written DTO it replaces. Patching the vendored model is not an option, since the next regeneration would revert it.

Reopening once the spec emits format: double, at which point the regenerated model is Double and no workaround is needed.

@gpunto gpunto closed this Aug 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
43.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@gpunto

gpunto commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #6634 (this PR cannot be reopened after the branch was force-pushed).

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