From 2c834ef9c45d346d024d16fb0c51d212113f06dd Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Mon, 25 Jan 2021 14:56:59 +0100 Subject: [PATCH] :zap: Minor improvements to Slack-Node --- .../nodes-base/nodes/Slack/MessageDescription.ts | 14 +++++++------- packages/nodes-base/nodes/Slack/Slack.node.ts | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/nodes-base/nodes/Slack/MessageDescription.ts b/packages/nodes-base/nodes/Slack/MessageDescription.ts index f4a6f5fb0d..6174f81dc9 100644 --- a/packages/nodes-base/nodes/Slack/MessageDescription.ts +++ b/packages/nodes-base/nodes/Slack/MessageDescription.ts @@ -15,6 +15,11 @@ export const messageOperations = [ }, }, options: [ + { + name: 'Delete', + value: 'delete', + description: 'Deletes a message', + }, { name: 'Get Permalink', value: 'getPermalink', @@ -33,12 +38,7 @@ export const messageOperations = [ { name: 'Update', value: 'update', - description: 'Updates a message.', - }, - { - name: 'Delete', - value: 'delete', - description: 'Deletes a message.', + description: 'Updates a message', }, ], default: 'post', @@ -1711,7 +1711,7 @@ export const messageFields = [ }, { displayName: 'Timestamp', - name: 'ts', + name: 'timestamp', type: 'string', required: true, default: '', diff --git a/packages/nodes-base/nodes/Slack/Slack.node.ts b/packages/nodes-base/nodes/Slack/Slack.node.ts index 96df14e2c9..d844001b88 100644 --- a/packages/nodes-base/nodes/Slack/Slack.node.ts +++ b/packages/nodes-base/nodes/Slack/Slack.node.ts @@ -798,10 +798,10 @@ export class Slack implements INodeType { //https://api.slack.com/methods/chat.delete if (operation === 'delete') { const channel = this.getNodeParameter('channelId', i) as string; - const ts = this.getNodeParameter('ts', i) as string; + const timestamp = this.getNodeParameter('timestamp', i) as string; const body: IDataObject = { channel, - ts, + ts: timestamp, }; // Add all the other options to the request responseData = await slackApiRequest.call(this, 'POST', '/chat.delete', body, qs);