-
Notifications
You must be signed in to change notification settings - Fork 305
Introduce message delivery receipts #5979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
SDK Size Comparison 📏
|
cbf13fa to
0b052a3
Compare
|
DB Entities have been updated. Do we need to upgrade DB Version? |
d6aebd9 to
89655f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds delivery status indicators for messages in the Stream Chat SDK. It introduces a new "delivered" state between "sent" and "read" states, allowing the UI to display when messages have been delivered to recipients but not yet read.
Key changes:
- Added
isMessageDeliveredproperty to message and channel state classes - Introduced new delivery status icon and UI indicators
- Updated database schema version to support delivery events persistence
- Added new drawable resource for the delivered state (double checkmark in grey)
Reviewed Changes
Copilot reviewed 116 out of 122 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChannelUserRead.kt | Added lastDeliveredAt and lastDeliveredMessageId properties |
| stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Config.kt | Added deliveryEventsEnabled configuration flag |
| stream-chat-android-core/src/main/java/io/getstream/chat/android/PrivacySettings.kt | Added delivery receipts privacy settings |
| stream-chat-android-ui-components/src/main/res/drawable/stream_ui_ic_check_double_grey.xml | New drawable for delivered status indicator |
| stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/adapter/MessageListItem.kt | Added isMessageDelivered property to MessageItem |
| stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/channels/MessageReadStatusIcon.kt | Updated to support delivered status icon |
| stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt | Added new MessageFooterStatusIndicator overload with params |
| stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/database/internal/ChatDatabase.kt | Incremented database version to 96 |
| stream-chat-android-state/src/main/java/io/getstream/chat/android/state/event/handler/internal/utils/ChatEventUtils.kt | Added MessageDeliveredEvent to ChannelUserRead conversion |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...oid-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
Show resolved
Hide resolved
stream-chat-android-compose-sample/src/main/res/values/strings.xml
Outdated
Show resolved
Hide resolved
19d96be to
7e134c3
Compare
...android-client/src/main/java/io/getstream/chat/android/client/extensions/ChannelExtension.kt
Outdated
Show resolved
Hide resolved
...android-client/src/main/java/io/getstream/chat/android/client/extensions/ChannelExtension.kt
Outdated
Show resolved
Hide resolved
...droid-client/src/main/java/io/getstream/chat/android/client/plugin/MessageDeliveredPlugin.kt
Show resolved
Hide resolved
.../main/java/io/getstream/chat/android/compose/ui/components/channels/MessageReadStatusIcon.kt
Show resolved
Hide resolved
stream-chat-android-core/src/main/java/io/getstream/chat/android/models/User.kt
Show resolved
Hide resolved
...roid-client/src/main/java/io/getstream/chat/android/client/receipts/MessageReceiptManager.kt
Outdated
Show resolved
Hide resolved
...roid-client/src/main/java/io/getstream/chat/android/client/receipts/MessageReceiptManager.kt
Outdated
Show resolved
Hide resolved
...hat-android-client/src/main/java/io/getstream/chat/android/client/receipts/MessageReceipt.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/io/getstream/chat/android/client/persistence/repository/ChatClientRepository.kt
Show resolved
Hide resolved
...oid-client/src/main/java/io/getstream/chat/android/client/receipts/MessageReceiptReporter.kt
Show resolved
Hide resolved
7e134c3 to
ce8df3f
Compare
| read.filter { read -> | ||
| read.user.id != message.user.id && | ||
| (read.lastDeliveredAt ?: NEVER) >= message.getCreatedAtOrDefault(NEVER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably want to also check for lastRead and promote it to delivered for supporting old messages where lastDeliveredAt is not present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Channel.deliveredReadsOf function returns a list of ChannelUserRead objects representing which ones have delivered the given message, regardless of the read state. If lastDeliveredAt is null, as in old messages, it is not returned in the list.
For reads, we can use Channel.readsOf function, which checks specifically read states, regardless of the delivered states.
That's to give customers the flexibility to list who has read messages and who has delivered messages, exclusively.
If they want to list delivered reads that are not read, they can do:
channel.deliveredReadsOf(message) - channel.readsOf(message)
e71c17a to
63b7e99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 131 out of 137 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
63b7e99 to
e235eb4
Compare
… push messages before they are processed by the SDK.
…on with privacy settings and mutes
0b179a7 to
716b933
Compare
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
Show resolved
Hide resolved
...oid-client/src/main/java/io/getstream/chat/android/client/notifications/ChatNotifications.kt
Show resolved
Hide resolved
...in/java/io/getstream/chat/android/client/notifications/handler/NotificationHandlerFactory.kt
Outdated
Show resolved
Hide resolved
...d-client/src/main/java/io/getstream/chat/android/client/persistence/db/ChatClientDatabase.kt
Show resolved
Hide resolved
...ent/src/main/java/io/getstream/chat/android/client/persistence/db/converter/DateConverter.kt
Show resolved
Hide resolved
...-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ChatHelper.kt
Outdated
Show resolved
Hide resolved
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
Outdated
Show resolved
Hide resolved
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
Show resolved
Hide resolved
…success or failure
…mp is always related to the latest message in the channel, and not for each message individually.
|


🎯 Goal
message.neweventhttps://linear.app/stream/issue/AND-769
🛠 Implementation details
Client module
message.deliveredWS event support.readsOf,deliveredReadsOf.ChatClient.markMessageAsDeliveredto mark a message as delivered for the current user.PrivacySettings.delivery_receiptssupport.last_delivered_atandlast_delivered_message_id.Delivery receipts are:
Privacy:
ownUser.privacySettings.deliveryReceipts.enabled== false.UI:
🎨 UI Changes
1-to-1 chat
Screen.Recording.2025-11-04.at.08.43.56.mov
Group chat
Screen.Recording.2025-11-04.at.10.06.56.mov
🧪 Testing