From 07dc85375e72e17eaeef84cdeee814a3b2706edf Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 10 May 2024 21:31:16 -0500 Subject: [PATCH] Add Description to ElementButton --- .../Messaging/Models/RichContent/ElementButton.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs index cd3d9da6..daf3de65 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs @@ -8,13 +8,18 @@ public class ElementButton public string Type { get; set; } = "web_url"; [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public string Url { get; set; } + public string? Url { get; set; } [Translate] public string Title { get; set; } = string.Empty; + [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public string Payload { get; set; } + [Translate] + public string? Description { get; set; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + public string? Payload { get; set; } [JsonPropertyName("is_primary")] public bool IsPrimary { get; set; }