Skip to content

Commit 93a4774

Browse files
Feature/arrays and devs (#17)
* Attempt to fix arrays * URL and text fixes * Add compiler version and remove gitignored files * Update * Update maven-build.yml * Update pom.xml * Update maven-publish.yml * Update maven-build.yml * Fix publish pipes * Remove duplicate pipes * Changelog upgrades * Update pom.xml * Dont use wrong array for array copy Co-authored-by: Eric Smekens <ericsmekens@msn.com> Co-authored-by: Eric Smekens <ericsmekens@msn.com>
1 parent f0c9be1 commit 93a4774

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [2.0.1] - 2022-11-07
9+
### Changed
10+
- Upgrade Gson to 2.10.0
11+
- Fix array not being properly cloned (#13)
12+
13+
## [2.0.0] - 2022-11-07
14+
### Added
15+
- Pushed to Maven Central
16+
### Changed
17+
- Changed namespace from com.cmtelecom to com.cm

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.cm</groupId>
77
<artifactId>text-sdk</artifactId>
8-
<version>2.0</version>
8+
<version>2.0.1</version>
99
<packaging>jar</packaging>
1010
<build>
1111
<plugins>
@@ -121,7 +121,7 @@
121121
<dependency>
122122
<groupId>com.google.code.gson</groupId>
123123
<artifactId>gson</artifactId>
124-
<version>2.8.2</version>
124+
<version>2.10</version>
125125
</dependency>
126126
</dependencies>
127127
</project>

src/main/java/com/cm/text/models/Channel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public enum Channel {
1818

1919
/// <summary>
2020
/// Sends messages to push using Hybrid messages.
21-
/// See also https://docs.cmtelecom.com/en/hybrid-messaging/v2.0.0
21+
/// See also https://developers.cm.com/messaging
2222
/// </summary>
2323
/// <remarks>Works only when <see cref="Message.HybridAppKey" /> is set</remarks>
2424
Push,

src/main/java/com/cm/text/models/Message.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public class Message {
106106
/// The given reference will be used in the status reports and MO replies for the message,
107107
/// so you can link the messages to the sent batch.
108108
/// For more information on status reports, see:
109-
/// https://docs.cmtelecom.com/business-messaging/v1.0#/status_report_webhook
109+
/// https://developers.cm.com/messaging/docs/incoming-status-report
110110
/// The given reference must be between 1 - 32 alphanumeric characters, and will not work using demo accounts.
111111
/// </summary>
112112
@SerializedName("reference")
@@ -121,7 +121,7 @@ public class Message {
121121
/// or a relative offset. A message is considered failed if it was not successfully delivered before that time.
122122
/// And via a Status Report we inform you this was the case.
123123
/// For more information on status reports, see:
124-
/// https://docs.cmtelecom.com/business-messaging/v1.0#/status_report_webhook
124+
/// https://developers.cm.com/messaging/docs/incoming-status-report
125125
/// You can supply the time zone for the validity period using either of the following formats:
126126
///
127127
/// Absolute date and time:

src/main/java/com/cm/text/models/multichannel/RichContent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void AddConversationPart(IRichMessage part)
3737
else
3838
{
3939
IRichMessage[] newArr = this.Conversation;
40-
Arrays.copyOf(newArr, this.Conversation.length + 1 );
40+
newArr = Arrays.copyOf(newArr, this.Conversation.length + 1 );
4141
newArr[newArr.length - 1] = part;
4242
this.Conversation = newArr;
4343
}
@@ -54,7 +54,7 @@ public void AddSuggestion(Suggestion suggestion)
5454
else
5555
{
5656
Suggestion[] newArr = this.Suggestions;
57-
Arrays.copyOf(newArr, this.Conversation.length + 1 );
57+
newArr = Arrays.copyOf(newArr, this.Suggestions.length + 1 );
5858
newArr[newArr.length - 1] = suggestion;
5959
this.Suggestions = newArr;
6060
}

0 commit comments

Comments
 (0)