feat: add DateTime picker state value (#183)

* feat: add support for date time picker state value

Currently, when using DateTimePicker[^1] the data from it cannot be seen on the state view while handling Action events.
This commit adds the extra field that is sent for this element.
The field is an optional UNIX Timestamp, as seen, for example, from the Go Slack API[^2] and Java Slack API [^3].

[^1]: https://api.slack.com/reference/block-kit/block-elements#datetimepicker
[^2]: b4b5a6428b/block.go (L53)
[^3]: 33b56c1ae2/slack-api-model/src/main/java/com/slack/api/model/view/ViewState.java (L28)

* fix: use already defined DateTime type
This commit is contained in:
Augusto César 2023-04-10 00:06:04 +02:00 committed by GitHub
parent dc91e05408
commit e2b4320528
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,6 +88,7 @@ pub struct SlackViewStateValue {
pub value: Option<String>,
pub selected_date: Option<String>,
pub selected_time: Option<String>,
pub selected_date_time: Option<SlackDateTime>,
pub selected_conversation: Option<SlackConversationId>,
pub selected_channel: Option<SlackChannelId>,
pub selected_user: Option<SlackUserId>,