-
Notifications
You must be signed in to change notification settings - Fork 678
Description
I’ve been playing with the member_joined_channel event and have noticed that the corresponding interface for this event might be outdated. Examining the payload of the event I received, I found the enterprise field, which contains the ID of the Slack organization, but it’s absent from the interface itself.
channel: string;
event: {
type: 'member_joined_channel',
user: '***',
channel: '***',
channel_type: 'C',
team: '***',
inviter: '***',
enterprise: '***',
event_ts: '1736863796.000500'
}
Is this intentional, or was it added at some point later by the web API, but the interface definition was not updated accordingly?
Packages:
Select all that apply:
-
@slack/web-api -
@slack/rtm-api -
@slack/webhooks -
@slack/oauth -
@slack/socket-mode -
@slack/types - I don't know
Reproducible in:
The Slack SDK version
"slack/bolt": "^4.2.0",
"slack-block-builder": "^2.8.0",Node.js runtime version
v20.9.0
OS info
ProductName: macOS
ProductVersion: 15.2
BuildVersion: 24C101
Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000
Steps to reproduce:
- Simply, setup an Event Listener with Bolt:
app.event('member_joined_channel', memberJoinedChannelCallback);
const memberJoinedChannelCallback = async ({
client,
event,
}: {
client: WebClient;
event: MemberJoinedChannelEvent;
}) => {
console.log('Member Joined Channel event');
console.log({ event });
});
Result:
event: {
type: 'member_joined_channel',
user: '***',
channel: '***',
channel_type: 'C',
team: '***',
inviter: '***',
enterprise: '***',
event_ts: '1736863796.000500'
}
Expected result:
Add the enterprise field to the interface, so it will correspond to the actual payloads that we receive.
Actual result:
Currently, the enterprise field is missing in the interface definition:
channel: string;