From d3946f6028c5e332e53945340971fc412f404240 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada <10496163+gagbo@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:31:44 +0200 Subject: [PATCH] fix: allow deserialization of recent link_shared (#260) `link_shared` events in the Slack developer sandboxes do not contain the `source` and `unfurl_id` options anymore, as the associated [`chat.unfurl`](https://api.slack.com/methods/chat.unfurl) API method now mandates passing the `(channel, ts)` tuple over the `(source, unfurl_id)` one > Both channel and ts must be provided together, or unfurl_id and source must be provided together. _And_ `channel`, `ts` are marked as required arguments. Close: #259 --- Cargo.toml | 2 +- src/models/events/push.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1b0122e..90015c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slack-morphism" -version = "2.1.1-alpha.0" +version = "2.2.0-alpha.0" authors = ["Abdulla Abdurakhmanov "] edition = "2021" license = "Apache-2.0" diff --git a/src/models/events/push.rs b/src/models/events/push.rs index 8f0b17c..c68bd83 100644 --- a/src/models/events/push.rs +++ b/src/models/events/push.rs @@ -205,8 +205,8 @@ pub struct SlackLinkSharedEvent { pub is_bot_user_member: bool, pub links: Vec, pub message_ts: SlackTs, - pub source: String, - pub unfurl_id: SlackUnfurlId, + pub source: Option, + pub unfurl_id: Option, pub user: SlackUserId, }