Add message.delete in Slack nodes (#1377)

This commit is contained in:
tumf
2021-01-25 22:56:37 +09:00
committed by GitHub
parent 4b54b39903
commit 025272953e
2 changed files with 58 additions and 0 deletions

View File

@@ -795,6 +795,17 @@ export class Slack implements INodeType {
Object.assign(body, updateFields);
responseData = await slackApiRequest.call(this, 'POST', '/chat.update', body, qs);
}
//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 body: IDataObject = {
channel,
ts,
};
// Add all the other options to the request
responseData = await slackApiRequest.call(this, 'POST', '/chat.delete', body, qs);
}
//https://api.slack.com/methods/chat.getPermalink
if (operation === 'getPermalink') {
const channel = this.getNodeParameter('channelId', i) as string;