All notable changes for the Slack platform will be documented in this file.
Note that there is no changelog available for the initial release of the platform (2.0.0), you can find the release notes here.
The changelog format is based on Keep a Changelog, and this project adheres to Semantic Versioning
- Erroring
SlackApiResponse
are now logged to ease debugging. If the error refers to OAuth scopes the required/provided scopes are logged. - Add support for distributed Slack app. The Xatkit configuration can now contain
xatkit.slack.client.id
andxatkit.slack.client.secret
properties that are used to start the SlackPlatform in distributed mode, allowing installations of the bot in multiple workspaces. The SlackPlatform manages the OAuth tokens in order to automatically fill the parameters of Reply actions and ensure that replies are posted in the correct workspaces. - Action
IsOnline(username, teamId)
that checks whether the given user is online (fix #12).
- Post actions must now define a
teamId
parameter that is used to specify the workspace to post to. This change breaks the public API: existing bots relying on Post actions must be updated to specify theteamId
parameter.
PostMessage
now accepts an optional parameterthreadTs
to specify the thread to post the message to.
PostMessage
andReply
now return the timestamp of the posted message instead ofnull
. This allows to reuse this timestamp to post in a given thread.- Action parameters and return are now statically typed. This change breaks the public API: execution models relying on the generic
Object
type for parameter and return now need to cast values to the expected type. (e.g.ChatPlatform.Reply(message)
now requires thatmessage
is aString
, this can be fixed with the following syntaxChatPlatform.Reply(message as String)
).
PostAttachmentsMessage
now correctly retrieves the channel to post to when the providedchannel
parameter refers to a channel name of a user name.
xatkit.slack.listen_mentions_on_group_channels
configuration option to specify whether the bot should only listen to mentions (messages containing @bot) in group channels. This configuration option is optional and is set by default to false.- The
slack
context now defines themessageTs
andthreadTs
parameters corresponding to the timestamp of the message and the timestamp of its containing thread message (optional,null
if the message is not contained in a thread). - Action
PostMessage(message, channel, threadTs)
. This action posts the provided message in the given thread. Note: this new action doesn't change the behavior ofPostMessage(message, channel)
.
SlackIntentProvider
andChatProvider
now use the new intent provider hierarchy (see xatkit-runtime/#221). This doesn't change the public API, but requires to use the latest versions of xatkit-runtime and xatkit-chat-platform.PostMessage
andReply
actions now return the timestamp of the posted message instead ofnull
. This allows to store the timestamp and reuse it to post messages in specific threads.
SlackUtils#DEFAULT_IGNORE_FALLBACK_ON_GROUP_CHANNELS_KEY
has been renamed toSlackUtils#DEFAULT_IGNORE_FALLBACK_ON_GROUP_CHANNELS
to conform to the format of other configuration keys.- Reply action now posts message in its containing thread if it exists instead of in the channel top-level conversation
PostAttachmentsMessage
now posts to the correct Slack channel when itschannel
attribute refers to an username or channel name.
See the release notes here.