This commit is contained in:
Mees Muller 2026-05-12 15:47:13 +03:00 committed by GitHub
commit 5819629b22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View File

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

View File

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