HubSpot / slack-client

An asynchronous HTTP client for Slack's web API
Apache License 2.0
114 stars 53 forks source link

Include attachments #212

Closed szabowexler closed 3 years ago

szabowexler commented 3 years ago

This is a simple band-aid PR that begins to tackle the new EVENT_CALLBACK payload. Slack has changed how they deliver events as webhooks. Historically, they would set the type in the top level, and you'd have to deserialize the "event" object depending on what you had.

Now, they outside envelope is much more homogenous (EVENT_CALLBACK as the uniform type). However, this means we have to support both, and adding the new support without breaking the old support is painful. This PR doesn't tackle that problem since it's MUCH larger than this, it simply adjusts the way messages are deserialized to include important information so we can still operate over bot messages.