Skip to content

Conversation

@OnestarLee
Copy link
Collaborator

@OnestarLee OnestarLee commented Apr 20, 2025

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team [email protected] with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

[CLNP-6663](https://sendbird.atlassian.net/browse/CLNP-6663)

Description Of Changes

Added validation for the mentionedMessageTemplate API, as it was moved from BaseMessage to UserMessage in Chat SDK v4.16.4.

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 11.49%. Comparing base (6fcbc23) to head (4ed0b24).

Files with missing lines Patch % Lines
...ges/uikit-react-native/src/libs/MentionManager.tsx 0.00% 5 Missing ⚠️
...ikit-react-native/src/hooks/useMentionTextInput.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
- Coverage   11.50%   11.49%   -0.01%     
==========================================
  Files         358      358              
  Lines        8485     8489       +4     
  Branches     2253     2377     +124     
==========================================
  Hits          976      976              
+ Misses       7508     7438      -70     
- Partials        1       75      +74     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OnestarLee OnestarLee changed the title fix: improve message validation related to mentionedMessageTemplate [CLNP-6663] fix: improve message validation related to mentionedMessageTemplate Apr 20, 2025
@OnestarLee OnestarLee requested review from bang9 and Copilot April 20, 2025 02:02
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 improves message validation by ensuring the proper handling of the mentionedMessageTemplate property, which has been moved from BaseMessage to UserMessage in Chat SDK v4.16.4.

  • Updated validation in MentionManager to use the in-operator for checking the existence of mentionedMessageTemplate.
  • Refined the conditional extraction of the mentionedMessageTemplate value in useMentionTextInput.

Reviewed Changes

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

File Description
packages/uikit-react-native/src/libs/MentionManager.tsx Updated validation logic to check for the existence of the mentionedMessageTemplate property before using it.
packages/uikit-react-native/src/hooks/useMentionTextInput.ts Modified the extraction logic for mentionedMessageTemplate using a conditional check to ensure proper fallback handling.
Files not reviewed (1)
  • package.json: Language not supported

Copy link
Collaborator

@bang9 bang9 left a comment

Choose a reason for hiding this comment

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

lgtm!

@OnestarLee OnestarLee added this pull request to the merge queue Apr 21, 2025
Merged via the queue into main with commit 94cbb3c Apr 21, 2025
7 checks passed
@OnestarLee OnestarLee deleted the feat/integrate-chat-sdk-4.16.4 branch April 21, 2025 04:05
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.

4 participants