Skip to content

fix(types): add missing file fields to ThreadBroadcastMessageEvent - #2763

Merged
srtaalej merged 1 commit into
mainfrom
fix/thread-broadcast-missing-fields
Oct 9, 2026
Merged

srtaalej merged 1 commit into
mainfrom
fix/thread-broadcast-missing-fields

Conversation

@srtaalej

@srtaalej srtaalej commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #2762.

ThreadBroadcastMessageEvent was missing fields that Slack sends when a thread reply with an attached file is also sent to the channel. This adds them as optional fields, matching FileShareMessageEvent:

  • files?: File[]
  • upload?: boolean
  • display_as_bot?: boolean
  • parent_user_id?: string

I reproduced this with a Bolt app subscribed to message.channels:

  • Broadcast with a file: all four fields are present in the payload.
  • Text-only broadcast: none of the four fields are present, including parent_user_id. That's why every field is optional.

x_files (present on FileShareMessageEvent) was not sent in either case, so it isn't added here.

This also adds a tsd test in packages/types/test/events/message.test-d.ts and a patch changeset for @slack/types.

Requirements

@srtaalej
srtaalej requested a review from a team as a code owner October 9, 2026 19:25
@changeset-bot

changeset-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d9642d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/types Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.44%. Comparing base (b3190fd) to head (d9642d5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2763      +/-   ##
==========================================
- Coverage   89.45%   89.44%   -0.01%     
==========================================
  Files          65       65              
  Lines       10525    10525              
  Branches      478      478              
==========================================
- Hits         9415     9414       -1     
- Misses       1079     1080       +1     
  Partials       31       31              
Flag Coverage Δ
cli-hooks 89.32% <ø> (ø)
cli-test 89.32% <ø> (ø)
logger 89.32% <ø> (ø)
oauth 89.32% <ø> (ø)
socket-mode 89.32% <ø> (ø)
web-api 89.32% <ø> (ø)
webhook 89.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@srtaalej srtaalej self-assigned this Oct 9, 2026
@srtaalej srtaalej added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch pkg:types applies to `@slack/types` labels Oct 9, 2026
@srtaalej

srtaalej commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

codecov failing by .01% 😬 can we increase the threshold for cases like this? cc. @zimeg @WilliamBergamin

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srtaalej LGTM! Thanks for keeping this most current and including a test 🧪

@zimeg

zimeg commented Oct 9, 2026

Copy link
Copy Markdown
Member

can we increase the threshold for cases like this?

These tests use the typescript typechecker to confirm correctness instead of unit tests with particular coverage. I fear this @slack/types package might not have actual coverage but I'm now curious if we can omit it from the @codecov checks too...

@zimeg zimeg added this to the types@next milestone Oct 9, 2026
@srtaalej
srtaalej merged commit e02e7fe into main Oct 9, 2026
17 of 18 checks passed
@srtaalej
srtaalej deleted the fix/thread-broadcast-missing-fields branch October 9, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:types applies to `@slack/types` semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ThreadBroadcastMessageEvent is missing files, upload, display_as_bot and parent_user_id

2 participants