Repository navigation
Releases
v0.36.0
Thanks again to Michal (@akfaew) for another round of fixes in this release.
Breaking changes — read before upgrading
Warning
v0.36.0 includes breaking API, decoding, and serialization changes.
Your code may fail to compile. Code that still compiles may decode or serialize
differently. Events API URL-verification responses now use a different JSON key.
Review every item below before upgrading, including RTM and Events API handlers,
tests that build or compare event payloads, and code that decodes into reused values.
1. RTM group_rename event types have changed
slack.GroupRenameEventgainsEventTimestamp. Positional struct literals no
longer compile. Use keyed literals, such as
slack.GroupRenameEvent{Type: "group_rename", Group: info, Timestamp: ts}.
Timestampkeeps itstsJSON key; the newevent_tskey is omitted when empty.slack.GroupRenameInfo.Createdis nowint64. ReplaceCreated: "1360782804"
withCreated: 1360782804. Parse input strings withstrconv.ParseInt(value, 10, 64),
and usestrconv.FormatInt(info.Created, 10)where a string is still needed.
Marshaling now emits a JSON number, and decoding rejects quoted timestamps.
2. URL-verification responses use a lowercase challenge key
slackevents.ChallengeResponse now marshals as {"challenge":"..."} instead of
{"Challenge":"..."}, matching Slack's documented response. Assignments from
untagged anonymous structs no longer compile; use
slackevents.ChallengeResponse{Challenge: value} instead.
3. slackevents.CallRejectedEvent is flattened
- Read fields directly from the event. Replace
event.Event.CallIDwith
event.CallID, and likewise forType,UserID,ChannelID, andExternalUniqueID. - Envelope fields are removed.
Token,TeamID,APIAppID,EventID, and
AuthedUsersare gone. Decode full callback payloads withslackevents.ParseEvent
and read envelope metadata from the returnedEventsAPIEventand its
*EventsAPICallbackEventdata. Typeis nowcall_rejected, not the outerevent_callback. Marshaling
produces the inner event object instead of the complete callback envelope.
4. Decoding into reused values replaces previous contents
ActionCallbacks,ContextElements, andBlockObjectsreplace previous entries
instead of appending. Decoding[A, B]followed by[C]now leaves[C];[]and
JSONnullclear all entries. The legacy{"elements":null}wrapper remains a no-op
forContextElements. To accumulate entries, decode separately and append the slices.AccessoryandSlackResponseErrorsreplace all previous variants on a
successful decode, instead of retaining fields from earlier decodes. JSONnull
clears accessory variants; it remains a no-op forSlackResponseErrorsand for the
legacy{"accessory":null}wrapper.
A failed decode may clear or partially replace the destination. Do not use it
after a decoding error. To keep the previous value, decode into a separate value and
assign it only after success.
Added
- Add
AdminUsersSetAdmin,AdminUsersSetOwner, andAdminUsersSetRegular, with
Contextvariants, to change a user's account type on a workspace or Enterprise org.
With an org ID,admin.users.setRegularalso removes the user's Workspace Owner
roles (Slack changelog).
The existingSetRegularstill calls the legacyusers.admin.setRegularendpoint. - Add
AdminUsersGetExpirationandAdminUsersSetExpiration, withContext
variants, to read and set when a guest account is disabled.
AdminUsersGetExpirationOptionTargetTeamandAdminUsersSetExpirationOptionTeamID
select a workspace in the org. Slack API reference:
admin.users.getExpiration,
admin.users.setExpiration. - Add
AdminUsersAssign,AdminUsersInvite, andAdminUsersRemove, withContext
variants and options for guest access, channels, and invite details, to manage
workspace membership in an Enterprise org.InviteToTeam,InviteGuest, and
InviteRestrictedstill call the legacyusers.admin.inviteendpoint. - Add
AdminUsersSessionList,AdminUsersSessionReset,AdminUsersSessionResetBulk,
AdminUsersSessionGetSettings,AdminUsersSessionSetSettings, and
AdminUsersSessionClearSettings, withContextvariants, to list and reset
member sessions and manage their session settings. - Add
AdminUsersUnsupportedVersionsExportand itsContextvariant to have
Slackbot send a CSV of members on unsupported Slack clients. - Add
AdminUsersAccessPauseandAdminUsersAccessResume, withContextvariants
and areasonoption, to queue pausing or resuming org-wide access for frontline
members. Onfailed_for_some_users, the returned response lists the rejected
users inInvalidUsers; Slack still queues the others.
Fixed
- Expose
event_tsin RTMgroup_renameevents asEventTimestamp, preserving
Timestampfor the separatetsfield. - Decode numeric creation timestamps in RTM
group_renameevents
instead of dispatchingunmarshalling_error. - Use the lowercase
challengeJSON key in Events API URL-verification responses. - Preserve call and user identifiers when parsing
call_rejectedEvents API events. - Replace previous actions, context elements, and composition objects when decoding into reused values.
- Replace stale accessory and API error variants when decoding into reused values.
- Stop the Socket Mode handler's event dispatcher when its client returns an error,
preserving queued events before returning.
Full Changelog: v0.35.0...v0.36.0
v0.35.0
This release fixes interaction payload spoofing, preserves huddle profile data, and corrects several message handling and 32-bit compatibility issues.
Upgrade notes
Warning
slackevents.Profile has three new fields. Positional struct literals no longer compile. Convert them to keyed literals before upgrading.
Events API profiles now preserve huddle state, expiration, and call ID through HuddleState, HuddleStateExpirationTS, and HuddleStateCallID.
Use field names when constructing profiles:
profile := slackevents.Profile{
DisplayName: "Alex",
Team: "T123ABC456",
}Security
InteractionCallbackParse now reads payload exclusively from the form-encoded request body.
Previously, it could accept an unsigned URL query payload while the application verified a signature covering only the body. An attacker who obtained a valid signed request within the accepted timestamp window could replay it with a forged interaction payload.
Callers must supply payload in an application/x-www-form-urlencoded request body. Form parsing errors are now returned to the caller.
See GHSA-pj2x-fjjr-q84c. Thanks to @jjiang-stripe for reporting the issue and providing the fix.
Fixes
- Prevent repeated escaping and data races when reusing a
MsgOptionTextoption. - Encode context block elements correctly when a block is passed by value.
- Preserve plus signs and percent signs in
slacktestmessage blocks and attachments. - Keep
slacktestbot identities independent when generating RTM connection information. - Prevent retry jitter panics with large durations on 32-bit platforms.
- Decode
JSONTimetimestamps outside the 32-bit integer range on 32-bit platforms.
Full changelog: v0.34.0…v0.35.0
v0.34.0
Huge thank you to Michal Mazurek (@akfaew) for submitting a bunch of patches for this
release.
Breaking changes — read before upgrading
Warning
v0.34.0 includes breaking API, decoding, serialization, and event-dispatch changes.
Your code may fail to compile. Code that still compiles may decode, serialize,
or route events differently. Malformed payloads can cause an entire Events API
event to be rejected.
Review every item below before upgrading, including interfaces, mocks, custom
event decoders, and stored payloads.
1. Retired user APIs have been removed
SetUserAsActiveandSetUserAsActiveContextare gone. Remove these calls.
SetUserPresencestill supportsawayandauto, but marking user as active is gone.GetUsersOptionPresenceis gone. Remove it fromGetUsers,GetUsersContext,
andGetUsersPaginatedcalls. User-list requests no longer send the retired
presenceparameter. UseGetUserPresenceorGetUserPresenceContextfor
individual presence checks.
2. Team-info method signatures have changed
GetTeamInfo, GetTeamInfoContext, GetOtherTeamInfo, and
GetOtherTeamInfoContext now accept ...GetTeamInfoOption. Update interfaces,
mocks, and assigned function types to include the variadic parameter. Existing
direct calls remain valid.
3. Auth-provider blocks have a new concrete type and lose raw JSON
Note
This is a brand new block. For now experimental as it doesn't yet appear in the slack
docs but is already part of their official node sdk.
auth_providerblocks now decode as*AuthProviderBlock, replacing
*UnknownBlock. Update type assertions and type switches.
An unchanged JSON round trip is no longer guaranteed. Marshaling drops unknown
fields, adds zero values for absent required fields, and can omit explicit nulls
or empty optional values. Keep the original payload if you need to preserve its JSON.
4. Stricter decoding can reject whole events or manifests
Values that were previously ignored or accepted can now return errors:
- Input blocks: malformed input elements fail decoding of the input block and
its containingBlocks. Missing elements and JSONnullinput retain their
previous behavior. - Auth-provider blocks: malformed known fields, such as
"name":42, fail
decoding of the containingBlocks. - Messages: malformed
display_as_botvalues, such as"false",0,[], or
{}, fail message decoding. Missing andnullvalues remain accepted.
Marshaling now emits explicittrueandfalsevalues that were previously
discarded.
A malformed message or block can cause slackevents.ParseEvent to reject the
entire event, preventing its delivery to your handler. Check error handling and
any captured payloads you replay.
5. Positional struct literals no longer compile
New fields in Features, TeamInfo, Msg, and Tab break positional literals for
these types. Use keyed literals with field names. Existing keyed literals
remain valid.
6. Built-in user-connection decoders take precedence
The built-in user_connection and user_connection_status_requested decoders take
precedence over custom entries in slack.EventMapping. Register custom decoders
for these events in slackevents.EventsAPIInnerEventMapping.
7. Socket Mode dispatch changes for envelopes without inner events
Empty-string event handlers no longer receive these envelopes. Register
handlers by the outer event type, for example
HandleEvents(slackevents.AppRateLimited, handler) for app_rate_limited.
A matching outer-type handler can now suppress the default handler. Check
applications that relied on the default handler receiving these envelopes.
Added
-
Add
GetCanvasContentandGetCanvasContentContext, with optional Markdown or
HTML output. Slack API reference. -
Add
GetTeamInfoOptionIncludeSlackbotAvailabilityand
TeamInfo.SlackbotAvailabilityfor advisory workspace availability.
Slack API reference. -
Add
RequestUserConnectionAuth,BulkUpdateUserConnections, their context
variants, and per-user bulk-update failures. AddAuthProviderBlock, the
user_connectionanduser_connection_status_requestedevents, and manifest
features.user_connections. The authentication APIs, status-requested event,
and manifest configuration follow the official Node SDK schemas; their standalone
reference pages were unavailable when added.
AuthProviderBlocksupport is experimental:auth_provideris not live in Slack
yet. This implementation uses the official Node SDK as a guide. Its schema and
behavior may change when Slack releases the block.
Node SDK release,
auth provider schema,
user connection event. -
Configure RTM WebSocket handshake headers with
RTMOptionDialHeaders.
Headers are copied and reused on reconnect; existing defaults remain unchanged. -
Decode
data.file_idon channel tabs asTab.Data.FileID, so the tab that
shows a given canvas can be identified fromconversations.info. Preserve
absentdataandfile_idfields when marshaling tabs.
Changed
- Document the undocumented preference endpoints and authentication limits of
GetUserPrefs,GetUserPrefsContext,MuteChat, andUnMuteChat. The mute
helpers use the legacymuted_channelspreference, which may differ from the
current client's notification settings.
Removed
-
Breaking: Remove
SetUserAsActiveandSetUserAsActiveContext, which called
the non-functionalusers.setActiveendpoint. Remove these calls from clients;
SetUserPresencestill supportsawayandauto, but neither forces a user active.
Slack retired this endpoint in 2018; see its
retirement notice. -
Breaking: Remove
GetUsersOptionPresenceand stop sending the retired
presenceparameter onusers.listrequests. Remove that option fromGetUsers,
GetUsersContext, andGetUsersPaginatedcalls. UseGetUserPresenceor
GetUserPresenceContextwhen individual presence information is needed.
Slack retired these features in 2018; see its
retirement notice.
Fixed
-
Remove the requested channel from the legacy muted-channel preference in
UnMuteChat. Skip updates when the channel is already unmuted, without panicking. -
Honor
ListTeamsParameters.LimitinListTeamsandListTeamsContextrequests. -
Encode multiple user IDs as a comma-separated list in
MigrationExchangerequests. -
Omit unset
TimestampToandLimitparameters inListRemoteFilesand
ListRemoteFilesContext, so Slack can apply its defaults. -
Preserve optional
display_as_botvalues in messages, including thread
broadcasts, asMsg.DisplayAsBot. Use a pointer to distinguish false from an
absent field. The remaining thread-broadcast fields already decode through
slackevents.MessageEvent.Message.
Node SDK change. -
Route Events API envelopes without an inner event, such as
app_rate_limited,
to handlers registered for the outer event type in Socket Mode. -
Reject request timestamps so far in the future that the duration difference
overflows, instead of allowing them to pass the five-minute timestamp check. -
Decode confirmation dialogs, options, and option groups in
BlockObjects
using their documented object and array fields instead of silently dropping them.
Slack composition objects. -
Decode
internal_team_idsin EKM original connected channel responses instead
of looking forinternal_team_ids_count.
Slack API reference. -
Honor the
Typesfilter inListFilesandListFilesContextrequests.
Slack API reference. -
Send the requested Y crop coordinate in user photo uploads.
-
Preserve the initial pagination state after failed conversations and stars
requests, so a rate-limited first page is retried instead of reporting an
empty successful result. -
Return Slack API errors from starred-item pagination rather than silently
treating them as the end of the list. -
Synchronize RTM connection-info reads with reconnect updates.
-
Reconnect RTM connections on permanent WebSocket read errors instead of
retrying until Gorilla WebSocket panics on a truncated stream. Continue
tolerating empty or incomplete JSON messages on healthy connections. -
Deliver warnings from user-profile and event-authorization requests.
-
Avoid a nil-pointer panic when decoding a
nullconversation-kick response. -
Honor the configured API endpoint in
SetUserCustomFieldsand
SetUserCustomFieldsContext. -
Preserve error causes in legacy admin helpers and Events API parsing, and
recognize wrapped rate-limit, pagination, and RTM errors. -
Accept valid non-ASCII text in
TextBlockObject.Validateby counting Unicode
code points for the 3000-character limit. -
Return custom option errors from
FunctionCompleteSuccessand
FunctionCompleteSuccessContextbefore sending a requ...
v0.33.0
This release adds support for Slackbot skills (changelog) and Slack's new block kit layout block (changelog).
- Slackbot skills: all seven
slackbot.skills.*methods are supported. You can create, inspect, update, and delete skills, list them, and also manage your personal library. - Admin skills: all
admin.slackbot.skills.*are supported as well. - Layout blocks: arrange existing blocks into rows and columns, with widths, alignment, borders, whilst allowing fallback for older clients (through blocks).
Full Changelog: v0.32.0...v0.33.0
v0.32.0
This release expands Slack Code support with channel views, context bars, and canvas collaboration, and fixes permission diagnostics, slash-command decoding, and workflow-button validation.
Important
Please read all the notes below, not just the breaking changes. Some changes deserve paying close attention to, like new fields in SlackResponse, and all the new *AgentConversation* methods.
Breaking changes
- Update interfaces, mocks, and function values that use the old canvas creation
signatures.CreateCanvasandCreateCanvasContextnow accept
options ...CreateCanvasOption. Existing direct calls still compile, but these
methods no longer satisfy interfaces with the old fixed signatures. Add the
variadic parameter to interface and mock declarations; adapt stored function
values or wrap the call in a function with the old signature. - Use field names when initializing
Properties,SlackResponse,
KickUserFromConversationSlackResponse, orSlackErrorResponse. New fields
make positional literals fail to compile. Existing keyed literals still work.
Added
- Show code diffs, HTML reports, Block Kit interfaces, and canvases in Slack Code
channels. UseSetAgentConversationViewto publish or update a view,
ListAgentConversationViewsto discover attached views, and
RemoveAgentConversationViewto remove them. All haveContextvariants.
Slack documents pull-request views too, but live requests have returned
invalid_view_type; publish a unified diff withAgentViewTypeDiffif that
happens. - Give a code channel useful context. Set context-bar links, action items,
a summary message, and external resource details with
SetAgentConversationPropertiesor itsContextvariant. Read session status,
title, assigned agents, origin message, context-bar ownership, summary, and
managed views throughProperties.AgentSessionandProperties.CodeChannel
in conversation responses. - Read and revise canvases attached to code channels.
GetAgentConversationCanvasretrieves markdown and comment threads, including
replies and optional resolved threads.SetAgentConversationCanvasContent
replaces the markdown while preserving section IDs and comment anchors on
unchanged sections. Both haveContextvariants. - Create a canvas directly in a channel, including in free workspaces that
require a channel. PassCreateCanvasOptionChannelID(channelID)to
CreateCanvasorCreateCanvasContext(#1623). - Try the new
examples/slack_codeCLI for channel
setup, context bars, views, canvases, commands, metadata inspection, and archival.
It includes sample HTML, Block Kit, markdown, and unified-diff files.
Fixed
- See which scopes are missing when an API call fails. Slack's
neededand
providedvalues are now preserved in responses andSlackErrorResponse, even
for methods that return only an error. Useerrors.Asto inspectNeededand
Provided; the error text is unchanged. - Discover code-channel views even when Slack returns an empty legacy
views
array.ListAgentConversationViewsalso preservessession_views, including
view types, names, and owner IDs. - Receive slash commands when Slack omits
is_enterprise_install. JSON
decoding now accepts absent or null values, including observed Slack Code
context-bar action deliveries over Socket Mode. - Send workflow buttons without an action ID. An empty
WorkflowButtonBlockElement.ActionIDis omitted from JSON so the button passes
Slack's block validation. Populated IDs are preserved.
Documentation and testing
- Clarify that Slack documents
raw_numbertable cells for publishing. If a
workspace rejects them withinvalid_blocks, send the number as a
TableRawTextCell. Null cells remain a received-only representation. - Add regression coverage for code-channel lifecycle events, Block Kit view
interactions, and agent slash commands through the existing HTTP and Socket
Mode parsers and handlers.
Full Changelog: v0.31.0...v0.32.0
v0.31.0
Breaking changes
-
ButtonBlockElementis no longer comparable becauseVisibleToUserIDsis a slice.
Value comparisons and map keys using it no longer compile; interface comparisons containing button values can panic. Use comparable identifiers as map keys and compare button contents explicitly:// Before same := a == b // After (import "reflect") same := reflect.DeepEqual(a, b)
-
If you create these structs without naming their fields, update that code. New fields were added to Block Kit elements,
Attachment,File,RemoteFileandFeatures. Code that supplies values by position now fails to compile. Include the field names, or use the existingNew...helper functions where available:// Before: values depend on field order. element := slack.RichTextSectionBroadcastElement{slack.RTSEBroadcast, "here"} // After: each value names its field. element := slack.RichTextSectionBroadcastElement{ Type: slack.RTSEBroadcast, Range: "here", }
-
Newly supported rich-text elements decode into concrete types instead of
*RichTextSectionUnknownElement. Update type assertions and switches for attachment, workflow, Work Object and message mentions; tags; canvas elements; citations; file and List record references; and Salesforce data fields. -
Request signature validation is stricter, and mismatch errors have changed.
NewSecretsVerifierrejects signatures without thev0=prefix or whose decoded length is not 32 bytes. Update any test fixtures that relied on the previous permissive parsing.SecretsVerifier.EnsurereturnsErrInvalidSignatureon a mismatch; replace checks of the old error text witherrors.Is(err, slack.ErrInvalidSignature). -
UninstallAppandRotateTokensnow use POST, including theirContextvariants. Update mocks or custom transports that expect GET requests or credentials in the URL to accept form-encoded POST bodies. -
OptionOnWarningcallbacks no longer receive thetokenparameter in form or query parameter maps. Update callbacks that rely on that field.
Added
-
Add
RTMOptionReadLimitandsocketmode.OptionReadLimitto limit incoming WebSocket message sizes on every connection, including reconnects. The default remains unlimited; exceeding a configured limit closes the connection and triggers normal reconnect handling. With compression enabled through a custom dialer, the limit counts compressed bytes and does not bound the size after decompression. -
Block Kit: Add typed Salesforce data fields with record IDs, field metadata, label visibility, and styles. These now decode into
RichTextSectionSalesforceDataFieldElementinstead ofRichTextSectionUnknownElement.[!WARNING]
has_withheld_salesforce_field_namesis based on live Slack responses and is absent from the reference and SDK models. -
Block Kit: Add typed workflow mentions with workflow and trigger IDs, display text, URLs, message locations, and styles. These now decode into
RichTextSectionWorkflowMentionElementinstead ofRichTextSectionUnknownElement. -
Block Kit: Add typed Work Object mentions with entity and app IDs, display text, URLs, icons, preview settings, product names, and styles. These now decode into
RichTextSectionWorkObjectMentionElementinstead ofRichTextSectionUnknownElement. -
Block Kit: Add typed attachment mentions with app, entity, icon, message, preview, and product metadata. These now decode into
RichTextSectionAttachmentMentionElementinstead ofRichTextSectionUnknownElement. -
Block Kit: Add typed rich-text tags with styles and constants for all nine colors. Tags now decode into
RichTextSectionTagElementinstead ofRichTextSectionUnknownElement. -
Block Kit: Add typed List record references with record and view IDs, display text, URLs, and styles. These now decode into
RichTextSectionListRecordElementinstead ofRichTextSectionUnknownElement. -
Block Kit: Add typed canvas user mentions and canvas message unfurls, including thread IDs and styles. These now decode into concrete types instead of
RichTextSectionUnknownElement. -
Block Kit: Add typed canvas rich-text elements with labels, section links, title visibility, styles, and skill metadata. These now decode into
RichTextSectionCanvasElementinstead ofRichTextSectionUnknownElement. -
Block Kit: Add
RichTextSectionCitationElementwith typed file, external, web, message, and memory details for rich-text citations. Preserve unknown detail variants as raw JSON. Citations now decode into this concrete type instead ofRichTextSectionUnknownElement. -
Block Kit: Add typed file
and message mention
rich-text elements, including styles and optional metadata. These now decode into concrete
types instead ofRichTextSectionUnknownElement. -
Add image alt text, GIF, PDF, 800px and inline thumbnails, audio and transcription metadata, preview truncation, remote file identifiers, canvas and List metadata, title blocks, and sharing and app metadata to
File. Preserve sharing and app metadata inRemoteFileresponses. -
Block Kit: Add missing element fields for button accessibility, agent prompts, visibility, conversation selection, rich-text input sizing, and rich-text styles and metadata, including shared emoji URLs.
-
Add
IsShare,IsMsgUnfurlandFilestoAttachment, so the files of a forwarded message are decoded rather than dropped. -
Add
CreateAgentConversationandArchiveAgentConversation(plusContextvariants) foragents.conversations.createandagents.conversations.archive. -
Add
SetAgentConversationCommands(plusContextvariant) andFeatures.CodeChannelsfor agent slash commands. -
Add all 12 Slack Lists API methods, with
Contextvariants and scoped options for lists, access, items, and exports. -
Block Kit: Add
DataTableActionCellfor buttons indata_tableblocks, with an optionalraw_textorraw_numberfallback (#1618). -
Add
AdminAppsApprovedListandAdminAppsRestrictedList(plusContextvariants) for theadmin.apps.approved.listandadmin.apps.restricted.listmethods, with typed app, scope and pagination responses (#1614). -
Add
AdminAppsRequestsList(plusContextvariant) for theadmin.apps.requests.listmethod, with typed request and pagination responses (#1615). -
Filenow unmarshals the video fields of the file object: the video thumbnail (ThumbVideo,ThumbVideoW,ThumbVideoHandThumbVideoTimestamp) andDurationMs,HLS,HLSEmbed,HLSPreview,MediaDisplayType,MP4,MP4LowandVTT.
Fixed
- RTM: Keep reader errors scoped to their connection and stop the old reader before reconnecting, so stale errors cannot close the next connection.
slackevents.ParseEventreturns an error for anevent_callbackwith a missing or null innereventinstead of panicking.- Release multipart upload writers when a request fails or returns before consuming the request body.
Full Changelog: v0.30.1...v0.31.0
v0.30.1
Important
This is a security release. Upgrade if your app passes file URLs from messages or events to GetFile. Full details are in CHANGELOG.md.
Security
GetFile, GetFileContext and UploadToURL now send the token only to https URLs on slack.com, slack-gov.com and their subdomains, and to the host set with OptionAPIURL. Any other URL returns an error before a request is made.
The url_private of a remote or external file (File.IsExternal) points outside Slack, so GetFile(file.URLPrivate) sent the token to that host. See GHSA-3q3v-34v2-g88f.
A test that points GetFile at an httptest server must also pass that server to OptionAPIURL:
api := slack.New("xoxb-test", slack.OptionAPIURL(ts.URL+"/"))
err := api.GetFile(ts.URL+"/files-pri/T1-F1/a.txt", &buf)Thanks to @Lordseriouspig (what a handle... 😂) for the report.
Full Changelog: v0.30.0...v0.30.1
v0.30.0
Warning
This release has breaking changes. It needs Go 1.26 or later, DeleteFileComment takes its arguments in a new order, and four methods have new variadic signatures that break interfaces and mocks. Read Breaking changes before you upgrade. Full details are in CHANGELOG.md.
Breaking changes
DeleteFileComment takes (fileID, commentID)
DeleteFileComment now uses the same argument order as DeleteFileCommentContext (#1611). Swap the arguments of every call:
// Before
err := api.DeleteFileComment(commentID, fileID)
// After
err := api.DeleteFileComment(fileID, commentID)The compiler cannot catch this because both arguments are strings. A call that still passes a comment ID (Fc…) will return an error in order to try to catch it. YMMV so please raise an issue if you encounter issues
Variadic options on CreateManifest and GetUserInfo
CreateManifest, CreateManifestContext, GetUserInfo and GetUserInfoContext now take variadic options. An interface or mock that declares the old signature needs the new parameter:
// Before
type slackAPI interface {
GetUserInfo(user string) (*slack.User, error)
CreateManifest(manifest *slack.Manifest, token string) (*slack.ManifestResponse, error)
}
// After
type slackAPI interface {
GetUserInfo(user string, options ...slack.GetUserInfoOption) (*slack.User, error)
CreateManifest(manifest *slack.Manifest, token string, options ...slack.CreateManifestOption) (*slack.ManifestResponse, error)
}Other
- The minimum supported Go version is now 1.26 (#1581).
UpdateUserGroupsParamshas a new slice field,AdditionalChannels, so it can no longer be compared with==or used as a map key (#1599).
Added
- Agent messaging events (
app_context_changed,agent_session_stopped,agent_session_title_changed),AppContextonAppHomeOpenedEventandMessageEvent,authorizationsonEventsAPICallbackEvent, andSetAgentSessionStatusandRenameAgentSessionforagents.sessions.*by @rliddler in #1607 AppId,CredentialsandOAuthAuthorizeUrlin theCreateManifestresponse by @sivchari in #1587Features.AgentViewandFeatures.AssistantViewapp manifest settings by @yuya-takeyama in #1589- More app manifest keys, so a typed export and update keeps them:
Features.UnfurlDomains,Features.RichPreviews,Features.Search,OAuthConfig.PKCEEnabled,OAuthConfig.TokenManagementEnabled,Settings.IsMCPEnabled,Settings.TokenRotationEnabled,Settings.IncomingWebhooks,Settings.FunctionRuntime,Settings.SIWSLinks,EventSubscriptions.MetadataSubscriptionsandOutgoingDomainsby @nlopes in #1609, #1610 and #1612 Attachment.HideColorand Block KitTaskCardBlock.HideTitleby @mkende in #1590additional_channelsandinclude_countoptions forusergroups.createandusergroups.updateby @JaiminBrahmbhatt in #1599SetAppIconforapps.icon.setby @JaiminBrahmbhatt in #1597AdminTeamsListforadmin.teams.listby @JaiminBrahmbhatt in #1593AdminUsersListforadmin.users.listby @JaiminBrahmbhatt in #1595- New
UserGroupfields:AutoProvision,ChannelCount,EnterpriseSubteamID,IsEditingRestricted,IsIDPGroup,IsMembershipLocked,IsOrgLevel,IsSection,IsSubteamandIsVisibleby @JaiminBrahmbhatt in #1605 GetUsersOptionIncludeLocaleandGetUserInfoOptionIncludeLocaleto choose whetherusers.listandusers.inforeturnlocaleby @JaiminBrahmbhatt in #1603 and @nlopes in #1613CreateManifestRaw,UpdateManifestRaw,ExportManifestRawandValidateManifestRaw, which keep manifest keys thatManifestdoes not model, andCreateManifestOptionTeamIDby @JaiminBrahmbhatt in #1601
Changed
- Go 1.26 is the minimum supported version, and CI covers Go 1.26 and 1.27 by @nlopes in #1581
DeleteFileCommenttakes(fileID, commentID)by @nlopes in #1611
Fixed
- Socket Mode and RTM reconnects wait at most 5 minutes between attempts, and
RetryConfig.BackoffMaxcaps the Web API retry delay, by @shushenghong in #1586 - Socket Mode reconnects when the stream ends in the middle of a TLS record instead of panicking by @shushenghong in #1608
GetFilereturns an error when the token cannot read the file instead of saving the sign-in page by @richardmilles in #1582
Other
- chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 by @dependabot[bot] in #1584
New Contributors
- @rliddler made their first contribution in #1607
- @shushenghong made their first contribution in #1586
- @yuya-takeyama made their first contribution in #1589
- @mkende made their first contribution in #1590
- @JaiminBrahmbhatt made their first contribution in #1599
- @richardmilles made their first contribution in #1582
Full Changelog: v0.29.0...v0.30.0
v0.29.0
v0.28.0
Added
Channelsfield to share an uploaded file with multiple conversations by @kenta-ja8 in #1579- Support for the container block by @jlhawn in #1574
- Full message object from
chat.postMessageresponses by @rustycl0ck in #1572
Fixed
- Correct typos in comments and debug strings by @maxtaran2010 in #1570
Other
- chore(deps): bump golangci/golangci-lint-action from 9.2.1 to 9.3.0 by @dependabot[bot] in #1569
- chore(deps): bump actions/stale from 10.3.0 to 10.4.0 by @dependabot[bot] in #1573
- chore(deps): bump actions/setup-go from 6 to 7 by @dependabot[bot] in #1576
- chore(deps): bump actions/stale from 10.4.0 to 11.0.0 by @dependabot[bot] in #1578
New Contributors
- @maxtaran2010 made their first contribution in #1570
- @kenta-ja8 made their first contribution in #1579
- @jlhawn made their first contribution in #1574
- @rustycl0ck made their first contribution in #1572
Full Changelog: v0.27.0...v0.28.0