Skip to content

Migrate channel config request bodies to generated models#6554

Draft
gpunto wants to merge 1 commit into
developfrom
migrate/channel-config-requests
Draft

Migrate channel config request bodies to generated models#6554
gpunto wants to merge 1 commit into
developfrom
migrate/channel-config-requests

Conversation

@gpunto

@gpunto gpunto commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Goal

Migrate the channel-config request bodies (hideChannel, muteChannel/unmuteChannel, updateChannelPartial) to generated models. Part of the incremental OpenAPI model migration.

Part of AND-1291

Implementation

  • Add generated internal HideChannelRequest, MuteChannelRequest, UpdateChannelPartialRequest in network.models; delete the hand-written ones. Repoint ChannelApi, ModerationApi, MoshiChatApi, and tests.
  • MuteChannelRequest: the field is now channelCids: List<String> (was channel_cid: String); both muteChannel and unmuteChannel pass listOf("$type:$id"). Wire payload verified unchanged in behaviour on device.
  • UpdateChannelPartialRequest: generated field order is (unset, set), so the call site now uses named args (set = set, unset = unset).
  • HideChannelRequest: clearHistory is now Boolean? (was Boolean); the call passes it positionally, no logic change.

Testing

  • Project-wide spotlessApply, apiDump (no API drift), detekt, and testDebugUnitTest all pass.
  • Verified on device: hideChannel/showChannel -> 200, muteChannel/unmuteChannel -> 200, and updateChannelPartial -> 200 with a custom-field (extraData) round-trip confirmed (sentinel set then unset).

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

github-actions Bot commented Jul 7, 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 7, 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.19 MB -0.00 MB 🚀
stream-chat-android-compose 12.66 MB 12.67 MB 0.00 MB 🟢

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

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