-
Notifications
You must be signed in to change notification settings - Fork 295
[AND-421] Message Reminders #5779
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
# Conflicts: # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api/ChatApi.kt # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt # stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.kt
DB Entities have been updated. Do we need to upgrade DB Version?
|
SDK Size Comparison 📏
|
# Conflicts: # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/di/BaseChatModule.kt # stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.kt
|
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 PR adds the "Message Reminders" feature to the Android client SDK, enabling creation, updating, deletion, and querying of message reminders (including bookmark type reminders without a due date). Key changes include new API endpoints and corresponding event types, mapping functions, and updated test cases verifying these operations.
Reviewed Changes
Copilot reviewed 58 out of 58 changed files in this pull request and generated no comments.
File | Description |
---|---|
ChatClientRemindersApiTests.kt | Added tests for creating, updating, deleting, and querying reminders. |
EventAdapter.kt & EventMapping.kt | Integrated new reminder event adapters and domain mappings. |
DomainMapping.kt & Related DTO/Request/Response Files | Introduced new models, endpoints, and converters for reminder functionality. |
BaseChatModule.kt, MoshiChatApi.kt, ChatApi.kt, ChatClient.kt, API Spec | Updated dependency injection and API interfaces to support reminders API operations. |
Comments suppressed due to low confidence (1)
stream-chat-android-client/src/test/java/io/getstream/chat/android/client/ChatClientRemindersApiTests.kt:0
- Consider adding a test case for creating a bookmark reminder (i.e. when 'remindAt' is null) so that the bookmarking functionality is explicitly validated.
File scope
🎯 Goal
Introduces the "Message Reminders" feature to the low-level client SDK.
Allows creating/updating/deleting reminders for messages for which the user will be notified in the future, or saving a message as a bookmark (reminder without due date). It also allows querying of existing reminders, for the purpose of building lists where the users could have an overview of all saved messages.
Additionally, it introduces an example in the
Compose
sample app, serving as a guideline on how a reminders screen could be built using the LLC operations.Specs: https://www.notion.so/stream-wiki/CHA-530-Snooze-message-remind-me-1886a5d7f9f6803abff5c271ad651d22
🛠 Implementation details
SDK
Add
ChatClient.createReminder
- operation for creating a new message reminder / saving a message for laterAdd
ChatClient.updateReminder
- operation for updating the due date (remindAt
time) for an existing reminderAdd
ChatClient.deleteReminder
- operation for deleting an existing reminderAdd
ChatClient.queryReminders
- operation for querying existing remindersAdd
ReminderCreateEvent
- event delivered when a new reminder is createdAdd
ReminderUpdatedEvent
- event delivered when a reminder is updatedAdd
ReminderDeletedEvent
- event delivered when a reminder is deletedAdd
NotificationReminderDueEvent
- event delivered when a reminder is dueAdd
Message.reminder
field - holds information about the reminder set for the message (stored in DB as well)Note: No real offline support is introduced for reminders, since we don't provide any state/UI for the reminders (other than the enhancement of the Message object), and the main functionality of the reminder is a push notification delivered when the reminder is due. We could introduce something like optimistic creations/updates/deletion of the reminders, but I don't think it makes too much sense, as the reminder wouldn't make sense if it is created on the BE after its due date.
Sample App
ChannelsActivity
- it is now aligned with the XML sample + provides a new link to the Reminders screenoverdue
,upcoming
,saved for later
...MessageList
- Ui created byMessageRemindersComponentFactory
🎨 UI Changes
query-reminders.mp4
create-edit-delete-reminders.mp4
🧪 Testing
TODO:
MessageReminder.message
andMessageReminder.channel
fieldsReminderEvents
inChannelLogic
andEventHandlerSequential
ReminderEvents
- check if it can becomeCidEvent
and maybe mark it asHasReminder