Pull Request Overview
- Opened on October 9, 2026
- Status Merged
- Commit count 2 with first commit October 9, 2026
Total Delta
Open Days
Test Delta
How long has this pull request spent in each phase of its lifecycle?
| Fraction of total time | Business days | Phase |
|---|---|---|
| N/A | 1.0 day | Issue creation to work beginning |
|
|
0.0 days | Authoring 1 commit before pull request opened for review |
|
|
0.2 days | Awaiting first review |
| Set up deploy tracking to begin tracking full PR start-to-deploy times | ||
Total time for pull request
0.2 business days
from first commit authored to merge
Deploy tracking has not been set up
fix(types): add missing file fields to ThreadBroadcastMessageEvent
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?: booleandisplay_as_bot?: booleanparent_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, includingparent_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 <!-- Place an x in each [ ] -->
- [x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
Package
@slack/types
SDK Version
@slack/[email protected]
Node.js Version
N/A (type definition issue)
Operating System
No response
Steps to Reproduce
- Set up an app subscribed to the
message.channelsevent. - Start a thread in a channel where the app is a member.
- Reply in that thread. Attach a file and check "Also send to #channel".
- Inspect the payload of the
messageevent the app receives.
In TypeScript, the following code does not compile:
import type { ThreadBroadcastMessageEvent } from "@slack/types";
function handle(event: ThreadBroadcastMessageEvent) {
event.files; // error TS2339: Property 'files' does not exist on type 'ThreadBroadcastMessageEvent'
}
Expected Result
ThreadBroadcastMessageEvent defines files?: File[], upload?: boolean, display_as_bot?: boolean and parent_user_id?: string. Slack sends these fields, so we can access them without a type assertion.
Actual Result
Slack sends a message event with subtype: "thread_broadcast". The event includes files, upload, display_as_bot and parent_user_id:
{
"type": "message",
"subtype": "thread_broadcast",
"user": "U0XXXXXXX",
"text": "broadcast with a file",
"ts": "1791448977.697319",
"thread_ts": "1791447929.601119",
"channel": "C0XXXXXXX",
"channel_type": "channel",
"event_ts": "1791448977.697319",
"client_msg_id": "...",
"parent_user_id": "U0XXXXXXX",
"display_as_bot": false,
"upload": false,
"files": [{ "id": "F0XXXXXXX", "name": "image.png", "filetype": "png", ... }],
"root": { ... },
"blocks": [ ... ]
}
However, ThreadBroadcastMessageEvent does not define any of these four fields:
In the same file, GenericMessageEvent defines files and parent_user_id, and FileShareMessageEvent defines all four.
Comments Threads Pending Resolution
@srtaalej LGTM! Thanks for keeping this most current and including a test 🧪
Resolved Comment Threads
No resolved comments have been left on this PR.