fix(Slack Trigger Node): Fix issue with new user event not correctly working (#14129)

This commit is contained in:
Jon
2025-03-26 22:09:11 +00:00
committed by GitHub
parent ffc0a596e0
commit 5f4e56f75b

View File

@@ -320,7 +320,7 @@ export class SlackTrigger implements INodeType {
const options = this.getNodeParameter('options', {}) as IDataObject;
const binaryData: IBinaryKeyData = {};
const watchWorkspace = this.getNodeParameter('watchWorkspace', false) as boolean;
let eventChannel: string = '';
// Check if the request is a challenge request
if (req.body.type === 'url_verification') {
const res = this.getResponseObject();
@@ -342,16 +342,19 @@ export class SlackTrigger implements INodeType {
return {};
}
const eventChannel = req.body.event.channel ?? req.body.event.item.channel;
if (eventType !== 'team_join') {
eventChannel = req.body.event.channel ?? req.body.event.item.channel;
// Check for single channel
if (!watchWorkspace) {
if (
eventChannel !== (this.getNodeParameter('channelId', {}, { extractValue: true }) as string)
eventChannel !==
(this.getNodeParameter('channelId', {}, { extractValue: true }) as string)
) {
return {};
}
}
}
// Check if user should be ignored
if (options.userIds) {