private List<IMessageBlock> GenerateApproval(SlashCommand command) { return new List<IMessageBlock> { new Header("Approval request"), new Section(new MarkdownText("*From*"), new MarkdownText(UserMention.Text(command.UserId))){BlockId = "originator"}, new Section(new MarkdownText("*Request For*"), new PlainText(command.Text)){BlockId = "request"}, new Actions { Elements = new List<IMessageElement> { new Button{Text="Approve", Style = ButtonStyle.Primary, Value="approved"}, new Button{Text="Deny", Style = ButtonStyle.Danger, Value="declined"} } } }; }
public void User() { Assert.Equal("<@U1234>", UserMention.Text("U1234")); }