Skip to content

RichTextDate.Timestamp string type instead of long #239

@ulrichb

Description

@ulrichb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions