mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02:00
Merge e800bc63b9 into 0ce820de73
This commit is contained in:
commit
5819629b22
|
|
@ -13,7 +13,7 @@ export class Slack extends VersionedNodeType {
|
|||
group: ['output'],
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Consume Slack API',
|
||||
defaultVersion: 2.4,
|
||||
defaultVersion: 2.5,
|
||||
};
|
||||
|
||||
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
||||
|
|
@ -23,6 +23,7 @@ export class Slack extends VersionedNodeType {
|
|||
2.2: new SlackV2(baseDescription),
|
||||
2.3: new SlackV2(baseDescription),
|
||||
2.4: new SlackV2(baseDescription),
|
||||
2.5: new SlackV2(baseDescription),
|
||||
};
|
||||
|
||||
super(nodeVersions, baseDescription);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export class SlackV2 implements INodeType {
|
|||
constructor(baseDescription: INodeTypeBaseDescription) {
|
||||
this.description = {
|
||||
...baseDescription,
|
||||
version: [2, 2.1, 2.2, 2.3, 2.4],
|
||||
version: [2, 2.1, 2.2, 2.3, 2.4, 2.5],
|
||||
defaults: {
|
||||
name: 'Slack',
|
||||
},
|
||||
|
|
@ -380,12 +380,19 @@ export class SlackV2 implements INodeType {
|
|||
const instanceId = this.getInstanceId();
|
||||
|
||||
if (resource === 'message' && operation === SEND_AND_WAIT_OPERATION) {
|
||||
await slackApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/chat.postMessage',
|
||||
createSendAndWaitMessageBody(this),
|
||||
);
|
||||
try {
|
||||
await slackApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/chat.postMessage',
|
||||
createSendAndWaitMessageBody(this),
|
||||
);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return [[{ json: { error: (error as JsonObject).message } }]];
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
const waitTill = configureWaitTillDate(this);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user