Minor improvements to Slack-Node

This commit is contained in:
Jan Oberhauser 2021-01-25 14:56:59 +01:00
parent 025272953e
commit 2c834ef9c4
2 changed files with 9 additions and 9 deletions

View file

@ -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: '',

View file

@ -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);