From 728a37dd02725cc8c2429f76ed495df9e2b7d989 Mon Sep 17 00:00:00 2001 From: "nick.yi" Date: Fri, 10 Oct 2025 11:10:32 +0800 Subject: [PATCH] add Alignment for ButtonTemplateMessage --- .../Messaging/Enums/AlignmentEnum.cs | 20 +++++++++++++++++++ .../Template/ButtonTemplateMessage.cs | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 src/Infrastructure/BotSharp.Abstraction/Messaging/Enums/AlignmentEnum.cs diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Enums/AlignmentEnum.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Enums/AlignmentEnum.cs new file mode 100644 index 000000000..7ffb9acb8 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Enums/AlignmentEnum.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BotSharp.Abstraction.Messaging.Enums +{ + public static class AlignmentEnum + { + public const string TopLeft = "topLeft"; + public const string BottomLeft = "bottomLeft"; + + public const string TopRight = "topRight"; + public const string BottomRight = "bottomRight"; + + public const string TopCenter = "topCenter"; + public const string BottomCenter = "bottomCenter"; + } +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplateMessage.cs b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplateMessage.cs index 0d8470d7a..adf78338f 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplateMessage.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/Template/ButtonTemplateMessage.cs @@ -20,4 +20,7 @@ public class ButtonTemplateMessage : IRichMessage, ITemplateMessage [JsonPropertyName("is_horizontal")] public bool IsHorizontal { get; set; } + + [JsonPropertyName("alignment")] + public string Alignment { get; set; } = AlignmentEnum.TopLeft; }