feat: Support 100 character client_refs in SMS - #625
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #625 +/- ##
=========================================
Coverage 99.05% 99.05%
Complexity 3643 3643
=========================================
Files 548 548
Lines 8051 8051
Branches 444 444
=========================================
Hits 7975 7975
Misses 56 56
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for longer SMS client-ref values by increasing the maximum allowed length and updating the release version/documentation accordingly.
Changes:
- Increased SMS message
client-refvalidation limit from 40 to 100 characters. - Updated unit test to reflect the new rejection threshold.
- Bumped SDK version to
9.11.0and updated README + CHANGELOG.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/com/vonage/client/sms/SmsClientTest.java | Updates the max-length validation test for SMS client-ref. |
| src/main/java/com/vonage/client/sms/messages/Message.java | Raises client-ref max length to 100 and updates Javadoc/error message. |
| src/main/java/com/vonage/client/HttpWrapper.java | Bumps internal client version used for the User-Agent to 9.11.0. |
| README.md | Updates dependency snippets to 9.11.0. |
| pom.xml | Updates project version to 9.11.0. |
| CHANGELOG.md | Adds a 9.11.0 entry describing the SMS client-ref change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
108
to
112
| public void setClientReference(String clientReference) { | ||
| if (clientReference.length() > 40) { | ||
| throw new IllegalArgumentException("Client reference must be 40 characters or less."); | ||
| if (clientReference.length() > 100) { | ||
| throw new IllegalArgumentException("Client reference must be 100 characters or less."); | ||
| } | ||
| this.clientReference = clientReference; |
Comment on lines
75
to
+76
| assertThrows(VonageApiResponseException.class, () -> client.submitMessage(message)); | ||
| assertThrows(IllegalArgumentException.class, () -> message.setClientReference("R".repeat(41))); | ||
| assertThrows(IllegalArgumentException.class, () -> message.setClientReference("R".repeat(101))); |
| This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
|
||
| # [9.11.0] | ||
| - SMS: Increased client reference (`client-ref`) maximum length from 40 to 100 characters, matching the Messages API |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support 100 character length client_ref values in SMS
Contribution Checklist