Skip to content

Commit

Permalink
fix: allow deserialization of recent link_shared (#260)
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
gagbo authored Apr 19, 2024
1 parent 3fca16d commit d3946f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "slack-morphism"
version = "2.1.1-alpha.0"
version = "2.2.0-alpha.0"
authors = ["Abdulla Abdurakhmanov <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/models/events/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ pub struct SlackLinkSharedEvent {
pub is_bot_user_member: bool,
pub links: Vec<SlackLinkObject>,
pub message_ts: SlackTs,
pub source: String,
pub unfurl_id: SlackUnfurlId,
pub source: Option<String>,
pub unfurl_id: Option<SlackUnfurlId>,
pub user: SlackUserId,
}

Expand Down

0 comments on commit d3946f6

Please sign in to comment.