diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs index cea110f1..1be8f208 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs @@ -9,6 +9,7 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent public string? Payload { get; set; } [JsonPropertyName("image_url")] public string? ImageUrl { get; set; } + [JsonPropertyName("postback_url")] public string? PostBackUrl { get; set; } } } diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Recipient.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Recipient.cs index 7bfbba8e..5c77924a 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Recipient.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Recipient.cs @@ -3,6 +3,6 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent { public class Recipient { - public string? Id { get; set; } + public string Id { get; set; } = string.Empty; } } diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/RichContent.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/RichContent.cs index c2b027cd..fb6a121f 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/RichContent.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/RichContent.cs @@ -2,12 +2,12 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent { public class RichContent { - public Recipient? Recipient { get; set; } + public Recipient Recipient { get; set; } = new Recipient(); /// /// RESPONSE /// [JsonPropertyName("messaging_type")] - public string? MessageingType { get; set; } + public string? MessagingType { get; set; } public T Message { get; set; } } } diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionModel.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionMessage.cs similarity index 93% rename from src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionModel.cs rename to src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionMessage.cs index 17830812..6b652e4e 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionModel.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionMessage.cs @@ -1,7 +1,7 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent { - public class SenderActionModel + public class SenderActionMessage { /* * Requests to display sender action should only include the sender_action parameter and the recipient object. diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplate.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplate.cs index bdd1149d..f610a682 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplate.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplate.cs @@ -10,8 +10,8 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent.Template public class ButtonElement { - public string? Type { get; set; } + public string Type { get; set; } = string.Empty; public string? Url { get; set; } - public string? Title { get; set; } + public string Title { get; set; } = string.Empty; } } diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/CommonTemplate.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/CommonTemplate.cs index ace1daac..e4b3ea8c 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/CommonTemplate.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/CommonTemplate.cs @@ -3,6 +3,7 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent.Template { public class CommonTemplate { + [JsonPropertyName("template_type")] public string TemplateType { get; set; } = string.Empty; public T Elements { get; set; } } diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/TextMessage.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/TextMessage.cs index bed603a2..94d85894 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/TextMessage.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/TextMessage.cs @@ -3,6 +3,6 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent { public class TextMessage { - public string? Text { get; set; } + public string Text { get; set; } = string.Empty; } } \ No newline at end of file