Skip to content

Move uploads, channel mutes and banned users to the v2 endpoints, keeping user moderation on v1 - #6836

Merged
gpunto merged 1 commit into
developfrom
migrate/v2-uploads-mutes-banned
Oct 16, 2026
Merged

gpunto merged 1 commit into
developfrom
migrate/v2-uploads-mutes-banned

Conversation

@gpunto

@gpunto gpunto commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Move file and image uploads, channel mutes and the banned users query to v2. The websocket stays on v1.

Part of AND-1637

Implementation

  • Uploads (/api/v2/chat/channels/.../file|image, /api/v2/uploads/...), channel mute and unmute, and query_banned_users move to v2.
  • User mute, unmute, ban, unban, flag and unflag move to a new ModerationV1Api that stays on v1: their /api/v2/moderation counterparts require AI moderation on the app.

Testing

  • V2LaneBatchEightTest parses the v2 banned users, channel mute and upload responses and checks the request bodies, including the banned users date filters.
  • MoshiChatApiTest covers the calls routed through ModerationV1Api.

Summary by CodeRabbit

  • Improvements
    • Updated service communication for image and file uploads, channel moderation, and banned-user queries to use current API routes.
    • User mute, unmute, flag, unflag, ban, and unban actions now use the appropriate moderation API, while channel moderation remains supported.
  • Tests
    • Added coverage for moderation and upload responses, request serialization, and timestamp formatting.

@gpunto gpunto added the pr:improvement Improvement label Oct 16, 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 6.22 MB 6.22 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.53 MB 11.53 MB 0.00 MB 🟢
stream-chat-android-compose 13.20 MB 13.20 MB 0.00 MB 🟢
stream-chat-android-ai-compose 2.04 MB 2.04 MB 0.00 MB 🟢
stream-chat-android-ai-ondevice 1.67 MB 1.67 MB 0.00 MB 🟢

@sonarqubecloud

Copy link
Copy Markdown

@gpunto
gpunto marked this pull request as ready for review October 16, 2026 08:49
@gpunto
gpunto requested a review from a team as a code owner October 16, 2026 08:49
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fcf7d4bc-91bc-4fb3-ac27-8d04ed52d431
📥 Commits

Reviewing files that changed from the base of the PR and between 39f60c8 and 76f2b0f.

📒 Files selected for processing: 7
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api/RetrofitCdnApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/ModerationApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/ModerationV1Api.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/di/ChatModule.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/network/infrastructure/V2LaneBatchEightTest.kt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

CDN endpoints now use API-prefixed paths, and the file uploader uses the configurable v2 Retrofit builder. User moderation requests now use a new v1 API. Channel moderation requests and banned-user queries remain on the v2 API with updated paths. Tests cover moderation routing, response parsing, request-body comparisons, and timestamp serialization.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 76f2b

No actionable issue is established from the available evidence. Complete normal upload and moderation checks before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 2.08% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 48 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main endpoint migration and correctly distinguishes v2 changes from user moderation remaining on v1.
Description check Passed The description includes the Goal, Implementation, and Testing sections and explains the endpoint changes, rationale, and test coverage. The Checklist section is missing, including explicit checklist …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the Goal, Implementation, and Testing sections and explains the endpoint changes, rationale, and test coverage. The Checklist section is missing, including explicit checklist confirmation for the linked issue, test updates, and CLA status.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the routes at night
New paths lead uploads right
The v1 calls hop in a row
The v2 calls keep their flow
Tests stamp dates and parse with care
Then rabbit bounds through API air

Comment @coderabbitai help to get the list of available commands.

@gpunto
gpunto added this pull request to the merge queue Oct 16, 2026
Merged via the queue into develop with commit 0096bd9 Oct 16, 2026
20 of 21 checks passed
@gpunto
gpunto deleted the migrate/v2-uploads-mutes-banned branch October 16, 2026 10:35
@stream-public-bot stream-public-bot added the released Included in a release label Oct 16, 2026
@stream-public-bot

Copy link
Copy Markdown
Contributor

🚀 Available in v7.15.0

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

Labels

pr:improvement Improvement released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants