Skip to content

Fix bridge/slack build breakage from slack-go/slack v0.23.1 API changes - #4

Merged
johnnyxmas merged 1 commit into
masterfrom
fix/slack-build-breakage
Aug 3, 2026
Merged

Fix bridge/slack build breakage from slack-go/slack v0.23.1 API changes#4
johnnyxmas merged 1 commit into
masterfrom
fix/slack-build-breakage

Conversation

@johnnyxmas

Copy link
Copy Markdown
Owner

Summary

Several fields the Slack bridge relied on moved or were renamed in the slack-go/slack dependency (pulled in via the recent dependabot bump), breaking compilation:

  • slack.Msg field casing changed: TimeStamp -> Timestamp, ThreadTimeStamp -> ThreadTimestamp.
  • slackevents.MessageEvent no longer carries its own top-level Attachments/Files fields. MessageEvent's custom UnmarshalJSON now always populates .Message (synthesized from the top-level JSON for regular messages, or the real nested object for message_changed), so all attachment/file handling now reads from ev.Message instead. This also makes the old top-level "legacy/RTM attachments blocks" callback-ID check in skipMessageEvent redundant with the existing ev.Message.Attachments check, so it's removed rather than duplicated.
  • filesCached/fileCached/handleDownloadFile now take slack.File instead of slackevents.File, since file data now only exists as slack.Msg.Files ([]slack.File); the two File types are structurally different and not interchangeable.
  • slack.FileUploadParameters was renamed to UploadFileParameters as part of the files.upload -> files.upload.v2 migration, and now takes a single Channel string (not Channels []string) and requires FileSize. The returned FileSummary no longer carries Shares, so uploadFile now does a follow-up GetFileInfo call to resolve the message id/thread timestamp of the uploaded file's share.

Test plan

  • bridge/slack, bridge/config, bridge/irc all build clean
  • go vet clean
  • Existing bridge/slack tests pass
  • Full binary build (previously failing) now succeeds and runs

Several fields the Slack bridge relied on moved or were renamed in the
slack-go/slack dependency (introduced via a dependabot bump), breaking
compilation:

- slack.Msg field casing changed: TimeStamp -> Timestamp,
  ThreadTimeStamp -> ThreadTimestamp.
- slackevents.MessageEvent no longer carries its own top-level
  Attachments/Files fields. MessageEvent's custom UnmarshalJSON now
  always populates .Message (synthesized from the top-level JSON for
  regular messages, or the real nested object for message_changed),
  so all attachment/file handling now reads from ev.Message instead.
  This also makes the old top-level "legacy/RTM attachments blocks"
  callback-ID check in skipMessageEvent redundant with the existing
  ev.Message.Attachments check, so it's removed rather than duplicated.
- filesCached/fileCached/handleDownloadFile now take slack.File
  instead of slackevents.File, since file data now only exists as
  slack.Msg.Files ([]slack.File); the two File types are structurally
  different and not interchangeable.
- slack.FileUploadParameters was renamed to UploadFileParameters as
  part of the files.upload -> files.upload.v2 migration, and now takes
  a single Channel string (not Channels []string) and requires
  FileSize. The returned FileSummary no longer carries Shares, so
  uploadFile now does a follow-up GetFileInfo call to resolve the
  message id/thread timestamp of the uploaded file's share.

Verified: bridge/slack, bridge/config and bridge/irc all build clean,
go vet clean, existing bridge/slack tests pass, and a full binary
build (previously failing) now succeeds.
@johnnyxmas
johnnyxmas merged commit ac7ee4a into master Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant