Skip to content

Commit

Permalink
input blocks need block_ids too
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brown authored and Michael Brown committed Nov 1, 2019
1 parent 215a45e commit 63cefee
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Slack/Slack.BlockKit/Classes/Layout/Input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class Input : Block
private const int labelTextLength = 2000;
private object _element;
private PlainText _hint;
private string _block_id;
private const int block_idLength = 255;
private const int hintTextLength = 2000;
public bool optional;

Expand Down Expand Up @@ -44,6 +46,18 @@ public object element
}
}
}

public string block_id
{
get => _block_id; set
{
if (value.Length > block_idLength)
{
throw new System.Exception($"block_id length must be less than {block_idLength} characters.");
}
_block_id = value;
}
}
public PlainText hint
{
get => _hint; set
Expand Down

0 comments on commit 63cefee

Please sign in to comment.