Skip to content

Skip message send when text is not changed. #5831

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Sagar0-0
Copy link
Contributor

🎯 Goal

Prevent redundant message sends when a user tries to send a message that hasn't been modified. This avoids unnecessary network requests and improves UX by ensuring only intentional edits are sent.

🛠 Implementation details

Updated the message sending logic to check whether the current message text is different from the original message content before attempting to send.

If the message text is unchanged, the send operation is skipped entirely.

This is applicable particularly for the Edit Message flow.

🧪 Testing

Verified manually by attempting to edit a message and sending it without making any changes.

Ensured that in such cases, the send action is skipped and the message remains unchanged. We can optionally show a toast or snackbar to notify the user know that the message was unchanged.

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs
  • Check the SDK Size Comparison table in the CI logs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

@Sagar0-0 Sagar0-0 requested a review from a team as a code owner June 16, 2025 17:48
@Sagar0-0 Sagar0-0 force-pushed the sagar/no-change-edit branch from f577390 to d9898ec Compare June 16, 2025 17:49
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