From f1bbd95acf2648eae0c99f6e842883179a38b395 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Mon, 10 Jun 2024 21:48:16 -0500 Subject: [PATCH] Add TitleAs for button. --- .../Messaging/Models/RichContent/ElementButton.cs | 3 +++ .../Messaging/Models/RichContent/QuickReplyElement.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs index daf3de65..9188242c 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs @@ -13,6 +13,9 @@ public class ElementButton [Translate] public string Title { get; set; } = string.Empty; + [Translate] + public string? TitleAs { get; set; } = string.Empty; + [JsonPropertyName("description")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [Translate] diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs index 4ad88ab9..0dafb34c 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/QuickReplyElement.cs @@ -6,6 +6,8 @@ public class QuickReplyElement public string ContentType { get; set; } = "text"; public string Title { get; set; } = string.Empty; + [Translate] + public string? TitleAs { get; set; } = string.Empty; public string? Payload { get; set; } [JsonPropertyName("image_url")]