From 4b23735e79b8f36aa1583e58e2561167c2bdae94 Mon Sep 17 00:00:00 2001 From: Guillermo Antezana Date: Fri, 17 Feb 2023 10:46:05 -0500 Subject: [PATCH 1/2] Fix button type element --- Peaky.Slack.BlockKit/Elements/ButtonElement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Peaky.Slack.BlockKit/Elements/ButtonElement.cs b/Peaky.Slack.BlockKit/Elements/ButtonElement.cs index e3747fb..4673650 100644 --- a/Peaky.Slack.BlockKit/Elements/ButtonElement.cs +++ b/Peaky.Slack.BlockKit/Elements/ButtonElement.cs @@ -9,7 +9,7 @@ public class ButtonElement : IBlockElement /// /// The type of element. In this case type is always button. /// - [JsonProperty("button")] + [JsonProperty("type")] public string Type => "button"; /// From 6896da984b6f45b69d18460a4c439868101aa357 Mon Sep 17 00:00:00 2001 From: Guillermo Antezana Date: Fri, 17 Feb 2023 10:47:36 -0500 Subject: [PATCH 2/2] Fix text property is null if not set --- Peaky.Slack.BlockKit/Layout/SectionBlock.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Peaky.Slack.BlockKit/Layout/SectionBlock.cs b/Peaky.Slack.BlockKit/Layout/SectionBlock.cs index 86c3167..31038e9 100644 --- a/Peaky.Slack.BlockKit/Layout/SectionBlock.cs +++ b/Peaky.Slack.BlockKit/Layout/SectionBlock.cs @@ -12,12 +12,12 @@ public class SectionBlock : ILayoutBlock /// [JsonProperty("type")] public string Type => "section"; - + /// /// The text for the block, in the form of a text object. /// Maximum length for the text in this field is 3000 characters. /// - [JsonProperty("text")] + [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] public TextComposition Text; ///