Skip to content

Conversation

@VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Sep 20, 2025

🎯 Goal

🛠 Implementation details

LLC

  • Introduce ChatNotification.MessageUpdated and ChatNotifications.ReactionNew + default handling
  • Introduce skipPush parameter to ChatClient.sendReaction to prevent sending push notifications for the reaction
  • Introduce emojiCode/skipPush to Reaction

Offline

  • Add support for emojiCode/skipPush to ensure the args are respected when syncing offline reactions

UI common

  • Add ReactionPushEmojiFactory for customising the default emojis for reaction psh notifications.

XML

  • Add ChatUi.reactionPushEmojiFactory for customizing the emoji codes for reaction push notifications

Compose

  • Add ChaTheme.reactionPushEmojiFactory for customizing the emoji codes for reaction push notifications

🎨 UI Changes

With emojiCode Without emojiCode
reaction_with_emoji1 reaction_without_emoji

🧪 Testing

reaction.new:

  1. Use an app migrated on Push V3
  2. React to a message
  3. A PN should be delivered to the message sender

message.updated

  1. Use an app migrated on Push V3
  2. Update a message which a different user is 'watching' (ex thread parent)
  3. A PN should be delivered to a different user
  4. Note: This PN is triggered by client.updateMessage(), but NOT by client.partialUpdateMessage(), so simple edit will not work.

To make sure client.updateMessage() is called, you can do the following:

  1. User A - send a message with two images
  2. User B - thread reply to the message from user A
  3. User A - open the message attachments in the Media Gallery screen
  4. User A - delete one attachment (triggers client.updateMessage())
  5. User B - should receive a PN of type message.updated

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.22 MB 3.22 MB 0.00 MB 🟢
stream-chat-android-offline 3.45 MB 3.45 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.52 MB 10.53 MB 0.00 MB 🟢
stream-chat-android-compose 12.74 MB 12.75 MB 0.01 MB 🟢

@github-actions
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/reaction/internal/ReactionEntity.kt

@VelikovPetar VelikovPetar requested review from a team and Copilot September 22, 2025 08:35
@VelikovPetar VelikovPetar marked this pull request as ready for review September 22, 2025 08:35
Copy link
Contributor

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 adds comprehensive support for Push V3 notifications, specifically introducing message.updated and reaction.new push notifications, along with the ability to skip push notifications for reactions. The implementation includes customizable emoji codes for reaction push notifications through a new factory pattern.

  • Add support for message.updated and reaction.new push notification types in the notification system
  • Introduce skipPush parameter to reaction sending methods to prevent push notifications when needed
  • Add ReactionPushEmojiFactory for customizing emoji codes displayed in reaction push notifications

Reviewed Changes

Copilot reviewed 71 out of 71 changed files in this pull request and generated no comments.

Show a summary per file
File Description
stream-chat-android-client Adds new push notification types, skipPush parameter to reaction APIs, and notification handling logic
stream-chat-android-core Extends Reaction model with emojiCode and skipPush fields, updates payload validation for new notification types
stream-chat-android-offline Updates database schema and mappers to support new reaction fields, handles offline sync for skipPush/emojiCode
stream-chat-android-state Adds support for skipPush in reaction state management and error handling
stream-chat-android-ui-common Introduces ReactionPushEmojiFactory and ReactionDefaults, updates MessageListController for new reaction parameters
stream-chat-android-ui-components Integrates ReactionPushEmojiFactory into ChatUI, updates MessageListViewModel to handle emojiCode and skipPush
stream-chat-android-compose Adds ReactionPushEmojiFactory to ChatTheme, updates reaction components to use emoji codes for push notifications
Comments suppressed due to low confidence (2)

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

# Conflicts:
#	DEPRECATIONS.md
#	stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/listener/internal/SendReactionListenerState.kt
Copy link
Contributor

@andremion andremion left a comment

Choose a reason for hiding this comment

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

Can you add more tests to increase the coverage a bit more on the new code of the LLC? ChatNotificationHandler, etc

@VelikovPetar
Copy link
Contributor Author

Can you add more tests to increase the coverage a bit more on the new code of the LLC? ChatNotificationHandler, etc

Added some extra Android tests here: 9e6d7fd

@VelikovPetar VelikovPetar enabled auto-merge (squash) October 1, 2025 16:14
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 1, 2025

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@VelikovPetar VelikovPetar merged commit d44d78b into develop Oct 1, 2025
12 of 13 checks passed
@VelikovPetar VelikovPetar deleted the feature/push-v3-support branch October 1, 2025 16:29
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.

3 participants