Skip to content

Conversation

andremion
Copy link
Contributor

🎯 Goal

Describe why we are making this change

🛠 Implementation details

Describe the implementation

🎨 UI Changes

Add relevant screenshots

Before After
img img

Add relevant videos

Before After

🧪 Testing

Explain how this change can be tested (or why it can't be tested)

Provide a patch below if it is necessary for testing

Provide the patch summary here
Provide the patch code here

Copy link
Contributor

DB Entities have been updated. Do we need to upgrade DB Version?
Modified Entities :

stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/message/internal/MessageEntity.kt

Copy link
Contributor

github-actions bot commented Oct 15, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.22 MB 3.23 MB 0.00 MB 🟢
stream-chat-android-offline 3.45 MB 3.45 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.54 MB 10.54 MB 0.00 MB 🟢
stream-chat-android-compose 12.76 MB 12.76 MB 0.00 MB 🟢

@andremion andremion force-pushed the AND-768-delete-message-for-me branch from 9c09a37 to 286f863 Compare October 15, 2025 14:00
@andremion andremion force-pushed the AND-768-delete-message-for-me branch from 286f863 to c74fd57 Compare October 15, 2025 14:03
@andremion andremion requested a review from Copilot October 15, 2025 14:03
Copy link
Contributor

@Copilot Copilot AI left a 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 implements the "Delete message for me" feature, allowing users to delete messages only from their own view while keeping them visible to other users. The feature adds a new deletedForMe field to the Message model and corresponding database entity, along with API support for the delete-for-me operation.

Key changes include:

  • Added deletedForMe Boolean field to the Message model and database entity
  • Implemented API endpoint for delete-for-me functionality with new query parameter
  • Updated UI components to handle and display delete-for-me state
  • Added sample implementation with custom component factory

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Message.kt Added deletedForMe field to core Message model
MessageEntity.kt Added deletedForMe field to database entity
MessageMapper.kt Updated mapping between entity and domain model
ChatDatabase.kt Incremented database version for schema change
MessageApi.kt Added deleteForMe query parameter to delete endpoint
ChatClient.kt Added deleteMessageForMe method
DeleteMessageForMeComponentFactory.kt Sample UI component for delete-for-me functionality
Various test files Updated tests to support new delete-for-me parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +110 to +111
title = "Delete for me",
message = "Are you sure you want to delete this message for you?",
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Hard-coded strings should be moved to string resources for better maintainability and localization support. Consider extracting these strings to the strings.xml file.

Copilot uses AI. Check for mistakes.

if (messageItem.message.deletedForMe) {
Text(
modifier = Modifier.padding(vertical = 4.dp),
text = "Deleted only for me",
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Hard-coded string should be moved to string resources for better maintainability and localization support. Consider extracting this string to the strings.xml file.

Copilot uses AI. Check for mistakes.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
67.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

1 participant