Skip to content

Commit 801fda4

Browse files
author
Yanan Wang
committed
Fixed issues related to comments.
1 parent 89c62bf commit 801fda4

7 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class QuickReplyElement
99
public string? Payload { get; set; }
1010
[JsonPropertyName("image_url")]
1111
public string? ImageUrl { get; set; }
12+
[JsonPropertyName("postback_url")]
1213
public string? PostBackUrl { get; set; }
1314
}
1415
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Recipient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent
33
{
44
public class Recipient
55
{
6-
public string? Id { get; set; }
6+
public string Id { get; set; } = string.Empty;
77
}
88
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/RichContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent
22
{
33
public class RichContent<T>
44
{
5-
public Recipient? Recipient { get; set; }
5+
public Recipient Recipient { get; set; } = new Recipient();
66
/// <summary>
77
/// RESPONSE
88
/// </summary>
99
[JsonPropertyName("messaging_type")]
10-
public string? MessageingType { get; set; }
10+
public string? MessagingType { get; set; }
1111
public T Message { get; set; }
1212
}
1313
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionModel.cs renamed to src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/SenderActionMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
namespace BotSharp.Abstraction.Messaging.Models.RichContent
33
{
4-
public class SenderActionModel
4+
public class SenderActionMessage
55
{
66
/*
77
* Requests to display sender action should only include the sender_action parameter and the recipient object.

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class ButtonTemplate : TextMessage
1010

1111
public class ButtonElement
1212
{
13-
public string? Type { get; set; }
13+
public string Type { get; set; } = string.Empty;
1414
public string? Url { get; set; }
15-
public string? Title { get; set; }
15+
public string Title { get; set; } = string.Empty;
1616
}
1717
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/CommonTemplate.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent.Template
33
{
44
public class CommonTemplate<T>
55
{
6+
[JsonPropertyName("template_type")]
67
public string TemplateType { get; set; } = string.Empty;
78
public T Elements { get; set; }
89
}

src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/TextMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ namespace BotSharp.Abstraction.Messaging.Models.RichContent
33
{
44
public class TextMessage
55
{
6-
public string? Text { get; set; }
6+
public string Text { get; set; } = string.Empty;
77
}
88
}

0 commit comments

Comments
 (0)