Skip to content

Commit

Permalink
Merge pull request #34 from mvesign/master
Browse files Browse the repository at this point in the history
Fixed several marked issues
  • Loading branch information
mvesign authored Jul 8, 2021
2 parents e5c47ca + 4c4d24b commit 5aa132b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 12 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.0] - 2021-07-08
- Ignore HybridAppKey when null instead of empty, to support Notifire flow of channel MobilePush
- Add DefaultValueHandling to RichContent property of Message model.
- Add Tag property to TextMessage model used within a rich message.
- Add Suggestions property to TextMessage model used within a rich message.
- Add AppleBusinessChat as channel type, and marked iMessage as obsolete.

## [2.0.6] - 2021-07-06
- Add Instagram

Expand All @@ -24,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.0.0] - 2020-08-26
- Removed Localizable Params because it is Deprecated by Facebook,
Also updated the WhatsApp Template Signature based on Facebook spec updates.
- Also updated the WhatsApp Template Signature based on Facebook spec updates.

## [1.8.0] - 2020-06-24
- Add Twitter support
Expand Down
13 changes: 12 additions & 1 deletion CM.Text/BusinessMessaging/Model/Channel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Runtime.Serialization;
using System;
using System.Runtime.Serialization;
using JetBrains.Annotations;

namespace CM.Text.BusinessMessaging.Model
Expand Down Expand Up @@ -63,9 +64,19 @@ public enum Channel
/// <remarks>
/// Note that CM needs to configure this for you to work.
/// </remarks>
[Obsolete("Use 'Channel.AppleBusinessChat' instead")]
// ReSharper disable once InconsistentNaming
iMessage,

/// <summary>
/// Messages will be sent over Apple Business Chat.
/// </summary>
/// <remarks>
/// Note that CM needs to configure this for you to work.
/// </remarks>
[EnumMember(Value = "Apple Business Chat")]
AppleBusinessChat,

/// <summary>
/// Messages will be sent over Line.
/// </summary>
Expand Down
3 changes: 2 additions & 1 deletion CM.Text/BusinessMessaging/Model/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class Message
/// Messages will be sent over the <see cref="Channel.Push" /> channel.
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, PropertyName = "appKey")]
public Guid HybridAppKey { get; set; }
public Guid? HybridAppKey { get; set; }

/// <summary>
/// Used when sending multipart or concatenated SMS messages and always used together with
Expand Down Expand Up @@ -132,6 +132,7 @@ public class Message
/// Can be used by channels that support rich content (all channels except <see cref="Channel.SMS" />,
/// <see cref="Channel.Voice" /> and <see cref="Channel.Push" /> at this moment)
/// </summary>
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, PropertyName = "richContent")]
public RichContent RichContent { get; set; }

/// <summary>
Expand Down
22 changes: 16 additions & 6 deletions CM.Text/BusinessMessaging/Model/MultiChannel/TextMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
namespace CM.Text.BusinessMessaging.Model.MultiChannel
{
/// <summary>
/// A regular text message, replaces the <see cref="Message.Body" /> for channels
/// that support rich content (all channels except <see cref="Channel.SMS" />, <see cref="Channel.Voice" />
/// and <see cref="Channel.Push" /> at this moment)
/// A regular text message, replaces the <see cref="Message.Body" /> for channels that support rich content
/// (all channels except <see cref="Channel.SMS" />, <see cref="Channel.Voice" /> and <see cref="Channel.Push" /> at this moment)
/// </summary>
[PublicAPI]
public class TextMessage : IRichMessage
Expand All @@ -28,11 +27,22 @@ public TextMessage(string text)
}

/// <summary>
/// A plain text message, when used it replaces the 'SMS' body text.
/// In <see cref="Channel.RCS"/>, when used in combination with an header and/or media this
/// will be set as the text of a rich card.
/// A plain text message, when used it replaces the 'SMS' body text.
/// In <see cref="Channel.RCS"/>, when used in combination with an header and/or media this will be set as the text of a rich card.
/// </summary>
[JsonProperty("text")]
public string Text { get; set; }

/// <summary>
/// Tag to send important and/or personally relevant 1:1 updates to recipients. E.g. to notify a recipient of an update on a recent purchase.
/// </summary>
[JsonProperty("tag")]
public string Tag { get; set; }

/// <summary>
/// The suggestions of a text message.
/// </summary>
[JsonProperty("suggestions")]
public SuggestionBase[] Suggestions { get; set; }
}
}
6 changes: 3 additions & 3 deletions CM.Text/CM.Text.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<Copyright>2020 CM.com</Copyright>
<PackageLicenseUrl>https://mit-license.org</PackageLicenseUrl>
<PackageReleaseNotes>See CHANGELOG.md for details</PackageReleaseNotes>
<Version>2.0.6</Version>
<Version>2.1.0</Version>
<PackageIconUrl>http://static.cmtelecom.com/images/cm-nuget.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/cmdotcom/text-sdk-dotnet</PackageProjectUrl>
<NeutralLanguage>en</NeutralLanguage>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyVersion>2.0.6.0</AssemblyVersion>
<FileVersion>2.0.6.0</FileVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 5aa132b

Please sign in to comment.