mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ Minor improvements to Slack-Node
This commit is contained in:
parent
025272953e
commit
2c834ef9c4
|
@ -15,6 +15,11 @@ export const messageOperations = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Delete',
|
||||||
|
value: 'delete',
|
||||||
|
description: 'Deletes a message',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Get Permalink',
|
name: 'Get Permalink',
|
||||||
value: 'getPermalink',
|
value: 'getPermalink',
|
||||||
|
@ -33,12 +38,7 @@ export const messageOperations = [
|
||||||
{
|
{
|
||||||
name: 'Update',
|
name: 'Update',
|
||||||
value: 'update',
|
value: 'update',
|
||||||
description: 'Updates a message.',
|
description: 'Updates a message',
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Delete',
|
|
||||||
value: 'delete',
|
|
||||||
description: 'Deletes a message.',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'post',
|
default: 'post',
|
||||||
|
@ -1711,7 +1711,7 @@ export const messageFields = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Timestamp',
|
displayName: 'Timestamp',
|
||||||
name: 'ts',
|
name: 'timestamp',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
default: '',
|
default: '',
|
||||||
|
|
|
@ -798,10 +798,10 @@ export class Slack implements INodeType {
|
||||||
//https://api.slack.com/methods/chat.delete
|
//https://api.slack.com/methods/chat.delete
|
||||||
if (operation === 'delete') {
|
if (operation === 'delete') {
|
||||||
const channel = this.getNodeParameter('channelId', i) as string;
|
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 = {
|
const body: IDataObject = {
|
||||||
channel,
|
channel,
|
||||||
ts,
|
ts: timestamp,
|
||||||
};
|
};
|
||||||
// Add all the other options to the request
|
// Add all the other options to the request
|
||||||
responseData = await slackApiRequest.call(this, 'POST', '/chat.delete', body, qs);
|
responseData = await slackApiRequest.call(this, 'POST', '/chat.delete', body, qs);
|
||||||
|
|
Loading…
Reference in a new issue