Skip to content

Comments

Expose team property on the message.read event#6105

Merged
VelikovPetar merged 4 commits intodevelopfrom
feature/expose_team_field_on_messageread_event
Jan 26, 2026
Merged

Expose team property on the message.read event#6105
VelikovPetar merged 4 commits intodevelopfrom
feature/expose_team_field_on_messageread_event

Conversation

@VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Jan 26, 2026

🎯 Goal

Exposes the team field on the MessageRead event.
Resolves: https://linear.app/stream/issue/AND-1025

🛠 Implementation details

Update the DTO and domain models for the message.read event to include the team.

🎨 UI Changes

NA

🧪 Testing

In a multi-tenant app, subscribe for MessageReadEvents. Observe the field team -> it should be populated with the team ID of the channel.

Summary by CodeRabbit

Release Notes

  • New Features
    • Message read events now include team context information, allowing the system to better track which team a message read action occurred within.

✏️ Tip: You can customize this high-level summary in your review settings.

@VelikovPetar VelikovPetar changed the title Expose team field on message.read event Expose team property on the message.read event Jan 26, 2026
@github-actions
Copy link
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.26 MB 5.26 MB 0.00 MB 🟢
stream-chat-android-offline 5.48 MB 5.48 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.63 MB 10.63 MB 0.00 MB 🟢
stream-chat-android-compose 12.84 MB 12.84 MB 0.00 MB 🟢

@sonarqubecloud
Copy link

@VelikovPetar VelikovPetar marked this pull request as ready for review January 26, 2026 13:59
@VelikovPetar VelikovPetar requested a review from a team as a code owner January 26, 2026 13:59
@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

Walkthrough

The changes add a new optional team field to the MessageReadEvent data class, extending both the DTO and domain event models. The field is propagated through mapping logic, test utilities, and test cases to maintain consistency across the Android SDK.

Changes

Cohort / File(s) Summary
Core Event Model Changes
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/EventDtos.kt, stream-chat-android-client/src/main/java/io/getstream/chat/android/client/events/ChatEvent.kt
Added optional team: String? = null field to MessageReadEventDto and MessageReadEvent data classes
Mapping & Transformation
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/EventMapping.kt
Updated domain event transformation to map team from DTO to MessageReadEvent constructor
API Surface
stream-chat-android-client/api/stream-chat-android-client.api
Updated public API signatures: constructor, synthetic constructor, component10 method, copy and copy\$default methods, and added getTeam() accessor
Test Infrastructure
stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/Mother.kt
Added optional team: String? = null parameter to randomMessageReadEvent() factory function
Test Arguments & Mappings
stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/mapping/EventMappingTestArguments.kt, stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser/EventArguments.kt
Updated test DTO/domain event mappings to include team field initialization
Test Cases
stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/channel/internal/ChannelEventHandlerTest.kt, stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsLogicTest.kt
Updated MessageReadEvent instantiations to include team = null parameter

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A team field hops in with grace,
Across the codebase, finding its place,
From DTO to domain so fine,
Tests aligned, all in line,
MessageReadEvent shines anew! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: exposing the team property on the message.read event.
Description check ✅ Passed The description covers the goal, implementation details, and testing approach, but is missing changelog confirmation, unit test coverage details, and several checklist items.
Linked Issues check ✅ Passed The PR successfully exposes the team field on MessageReadEvent across DTO, domain model, mapping, and test files, directly addressing AND-1025's requirement.
Out of Scope Changes check ✅ Passed All changes are directly related to exposing the team field on MessageReadEvent; no unrelated modifications detected in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

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

@VelikovPetar VelikovPetar merged commit 6fe8d53 into develop Jan 26, 2026
19 of 20 checks passed
@VelikovPetar VelikovPetar deleted the feature/expose_team_field_on_messageread_event branch January 26, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants