Skip to content

Move message, reaction, reply, translate and action endpoints to v2 - #6837

Merged
gpunto merged 2 commits into
developfrom
migrate/v2-lane-3-messages-search
Oct 16, 2026
Merged

gpunto merged 2 commits into
developfrom
migrate/v2-lane-3-messages-search

Conversation

@gpunto

@gpunto gpunto commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Move the message endpoints to v2: send, get, update, partial update, delete, actions, reactions, reaction queries, replies and translations. The websocket stays on v1.

Part of AND-1637

Implementation

  • MessageApi is built on /api/v2/chat/.... v2 nests custom data under custom, so a sent or updated message and a reaction keep their custom data.
  • A message sent back carries the declared fields responses copy into extraData (mml, poll_id, mentioned_group_ids, restricted_visibility). They go back to their typed fields. The response-only ones (draft, image_labels) are dropped, since the backend would store them as custom data.

Testing

  • V2LaneBatchFiveTest parses the v2 message, reply, reaction and translation responses and checks the request bodies.
  • DtoMappingTest covers the declared fields sent back as typed fields.

Summary by CodeRabbit

  • New Features
    • Message operations now use the v2 API routes, including sending, retrieving, updating, and deleting messages, as well as reactions, actions, translations, and replies.
    • Message requests now map poll IDs, message markup, mentioned group IDs, and restricted visibility to their designated fields. Unrelated custom data continues to be preserved.

@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 🟢

@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: 988ea282-6155-4f6b-a48d-edcc3b45203e
📥 Commits

Reviewing files that changed from the base of the PR and between 39f60c8 and 308ebb2.

📒 Files selected for processing: 6
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/MessageApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DtoMapping.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/mapping/DtoMappingTest.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/network/infrastructure/V2LaneBatchFiveTest.kt
  • stream-chat-android-ui-uitests/src/androidTest/java/io/getstream/chat/android/uitests/ui/BaseUiTest.kt

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

📝 Walkthrough

Message endpoints now use the /api/v2/chat prefix, and MessageApi is created with the v2 Retrofit builder. Message request mapping removes draft and image_labels from outgoing custom data and maps selected values to typed fields. Tests cover request mapping, v2 response parsing and serialization, and the updated UI test mock path.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 308eb

Message endpoints now use the v2 API paths and request shapes. The supplied context shows no concrete merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 40 functions across 6 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 and concisely describes the main change: moving message, reaction, reply, translation, and action endpoints to v2.
Description check Passed The description includes the required Goal, Implementation, and Testing sections. It accurately explains the v2 endpoint migration, custom-data mapping, websocket scope, and test coverage. The Checkli…
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 required Goal, Implementation, and Testing sections. It accurately explains the v2 endpoint migration, custom-data mapping, websocket scope, and test coverage. The Checklist section is omitted, so issue linkage, test or documentation updates, and CLA status are not explicitly recorded.

  • 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 hops along the route,
Where v2 paths now lead throughout.
It sorts the fields in custom data,
And checks the bodies, hop by hop.
The fixtures parse; the tests all run,
Then rabbit rests beneath the moon.

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

@andremion andremion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Two notes inline, both optional.

@gpunto
gpunto enabled auto-merge October 16, 2026 09:57
@sonarqubecloud

Copy link
Copy Markdown

@gpunto
gpunto added this pull request to the merge queue Oct 16, 2026
Merged via the queue into develop with commit efac9be Oct 16, 2026
19 checks passed
@gpunto
gpunto deleted the migrate/v2-lane-3-messages-search branch October 16, 2026 11:24
@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