Add chat.getPermalink interface in Slack Nodes.

This commit is contained in:
tumf
2021-01-20 16:40:24 +09:00
parent 28d54ed439
commit 2bd05abc3e
2 changed files with 55 additions and 0 deletions

View File

@@ -795,6 +795,13 @@ 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.getPermalink
if (operation === 'getPermalink') {
const channel = this.getNodeParameter('channelId', i) as string;
const ts = this.getNodeParameter('messageTs', i) as string;
const qs = { channel: channel, message_ts: ts };
responseData = await slackApiRequest.call(this, 'GET', '/chat.getPermalink', {}, qs);
}
}
if (resource === 'reaction') {
const channel = this.getNodeParameter('channelId', i) as string;