From 0212d65dae885a6a153c67095f04215f5e1f8278 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Tue, 24 May 2022 09:12:10 +0200 Subject: [PATCH] fix(Slack Node): Fix Channel->Kick (#3365) --- packages/nodes-base/credentials/SlackOAuth2Api.credentials.ts | 1 + packages/nodes-base/nodes/Slack/Slack.node.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/credentials/SlackOAuth2Api.credentials.ts b/packages/nodes-base/credentials/SlackOAuth2Api.credentials.ts index e4aef0c824cde..fa8efae44c96f 100644 --- a/packages/nodes-base/credentials/SlackOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/SlackOAuth2Api.credentials.ts @@ -5,6 +5,7 @@ import { //https://api.slack.com/authentication/oauth-v2 const userScopes = [ + 'channels:write', 'chat:write', 'files:read', 'files:write', diff --git a/packages/nodes-base/nodes/Slack/Slack.node.ts b/packages/nodes-base/nodes/Slack/Slack.node.ts index 53089c04c1203..d3f697a7b7cd1 100644 --- a/packages/nodes-base/nodes/Slack/Slack.node.ts +++ b/packages/nodes-base/nodes/Slack/Slack.node.ts @@ -339,7 +339,7 @@ export class Slack implements INodeType { const channel = this.getNodeParameter('channelId', i) as string; const userId = this.getNodeParameter('userId', i) as string; const body: IDataObject = { - name: channel, + channel, user: userId, }; responseData = await slackApiRequest.call(this, 'POST', '/conversations.kick', body, qs);