mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Slack Trigger Node): Fix issue with new user event not correctly working (#14129)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user