Backwards-incompatible changes
SquarebotSlackMessageValue.user
is now nullable. It will benull
if the message is abot_message
subtype.
New features
-
Added
SquarebotSlackMessageValue.bot_id
to capture the ID of the app that send a bot message. -
Support for Slack block actions interactions. These interactions happen when a user interacts with a message's interactive elements (e.g., buttons, menus). These Slack payloads are parsed into
SlackBlockActionsPayload
objects and published to a block action Kafka topic ($SQUAREBOT_TOPIC_BLOCK_ACTIONS
) withSquarebotSlackBlockActionsKey
key andSquarebotSlackBlockActionsValue
value models. -
Support for Slack view submission interactions. These interactions happen when a modal is submitted. These Slack payloads are parsed into
SlackViewSubmissionPayload
objects and published to a view submission Kafka topic ($SQUAREBOT_TOPIC_VIEW_SUBMISSION
) withSquarebotSlackViewSubmissionKey
key andSquarebotSlackViewSubmissionValue
value models. The value model doesn't yet fully parse the view into Pydantic models; clients will need to inspect the JSON object to get the submitted state of the model. Once more Pydantic modeling of Slack views and Block Kit blocks and elements is implemented, we can update the value model to provide more fully typed messages. -
Publish AsyncAPI documentation to the
/asyncapi
endpoint. This documentation site is generated automatically through Faststream.
Bug fixes
-
Fix setting the
is_bot
property ofSquarebotSlackMessageValue
to account for messages without thebot_message
subtype, but which still have abot_id
set. -
Improved the Slack message verification so that it now handles both JSON-formatted posts and url-encoded form posts. This change is necessary because Slack sends JSON-formatted posts for messages and url-encoded form posts for interactions. The verification now works for both types of posts.
What's Changed
- Fix command for updating dependencies by @jonathansick in #30
- DM-45917: Configure URL for hosting async api schema and doc by @jonathansick in #31
- DM-46413: Fix setting the SquarebotSlackMessage.is_bot field by @jonathansick in #32
- DM-46427: Handle slack interaction payloads by @jonathansick in #33
Full Changelog: 0.9.0...0.10.0