Skip to content

Commit 669639d

Browse files
authored
Merge pull request #1182 from yileicn/master
add Alignment for ButtonTemplateMessage
2 parents 5a6a93c + 728a37d commit 669639d

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace BotSharp.Abstraction.Messaging.Enums
8+
{
9+
public static class AlignmentEnum
10+
{
11+
public const string TopLeft = "topLeft";
12+
public const string BottomLeft = "bottomLeft";
13+
14+
public const string TopRight = "topRight";
15+
public const string BottomRight = "bottomRight";
16+
17+
public const string TopCenter = "topCenter";
18+
public const string BottomCenter = "bottomCenter";
19+
}
20+
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ public class ButtonTemplateMessage : IRichMessage, ITemplateMessage
2020

2121
[JsonPropertyName("is_horizontal")]
2222
public bool IsHorizontal { get; set; }
23+
24+
[JsonPropertyName("alignment")]
25+
public string Alignment { get; set; } = AlignmentEnum.TopLeft;
2326
}

0 commit comments

Comments
 (0)