Skip to content

ThreadBroadcastMessageEvent is missing files, upload, display_as_bot and parent_user_id #2762

Description

@shibayu36

Package

@slack/types

SDK Version

@slack/types@3.2.0

Node.js Version

N/A (type definition issue)

Operating System

No response

Steps to Reproduce

  1. Set up an app subscribed to the message.channels event.
  2. Start a thread in a channel where the app is a member.
  3. Reply in that thread. Attach a file and check "Also send to #channel".
  4. Inspect the payload of the message event 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:

export interface ThreadBroadcastMessageEvent {
type: 'message';
subtype: 'thread_broadcast';
event_ts: string;
text: string;
attachments?: MessageAttachment[];
blocks?: (KnownBlock | Block)[];
user: string;
ts: string;
thread_ts?: string;
root: (GenericMessageEvent | BotMessageEvent) & {
thread_ts: string;
reply_count: number;
reply_users_count: number;
latest_reply: string;
reply_users: string[];
};
client_msg_id: string;
channel: string;
channel_type: ChannelTypes;
}

In the same file, GenericMessageEvent defines files and parent_user_id, and FileShareMessageEvent defines all four.

Activity

  1. added
    bugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
    pkg:typesapplies to `@slack/types`
    and removed
    pkg:typesapplies to `@slack/types`
    on Oct 9, 2026
  2. srtaalej commented on Oct 9, 2026

    @srtaalej
    Contributor

    thank you for taking the time to report this @shibayu36! I've confirmed the issue in repro and went ahead and opened PR #2763 to address it. 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions