The current implementation of RichTextDate uses a string type for Timestamp:
|
public string Timestamp { get; set; } |
When using RichTextDate against the current Slack API, we're getting Slack error respones like this:
[ERROR] must provide an integer [json-pointer: /blocks/0/elements/1/elements/1/elements/1/timestamp
In the Slack docs also number is mentioned for timestamp: https://api.slack.com/reference/block-kit/blocks#date-element-type.
I've also tested with a custom RichTextSectionElement subtype with public long Timestamp and it works fine.
So I think we should change the type to long and also the corresponding ToTimestamp() helper.
The current implementation of
RichTextDateuses a string type forTimestamp:SlackNet/SlackNet/Blocks/RichTextBlock.cs
Line 96 in 9e94680
When using
RichTextDateagainst the current Slack API, we're getting Slack error respones like this:In the Slack docs also
numberis mentioned fortimestamp: https://api.slack.com/reference/block-kit/blocks#date-element-type.I've also tested with a custom
RichTextSectionElementsubtype withpublic long Timestampand it works fine.So I think we should change the type to
longand also the correspondingToTimestamp()helper.