mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
fix(API): Fix manual chat trigger execution (#8300)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type express from 'express';
|
||||
import { Service } from 'typedi';
|
||||
import {
|
||||
type IWebhookData,
|
||||
type IWorkflowExecuteAdditionalData,
|
||||
type IHttpRequestMethods,
|
||||
WebhookPathTakenError,
|
||||
Workflow,
|
||||
import { WebhookPathTakenError, Workflow } from 'n8n-workflow';
|
||||
import type {
|
||||
IWebhookData,
|
||||
IWorkflowExecuteAdditionalData,
|
||||
IHttpRequestMethods,
|
||||
IRunData,
|
||||
} from 'n8n-workflow';
|
||||
import type {
|
||||
IResponseCallbackData,
|
||||
@@ -189,6 +189,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
userId: string,
|
||||
workflowEntity: IWorkflowDb,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
runData?: IRunData,
|
||||
sessionId?: string,
|
||||
destinationNode?: string,
|
||||
) {
|
||||
@@ -213,6 +214,10 @@ export class TestWebhooks implements IWebhookManager {
|
||||
const key = this.registrations.toKey(webhook);
|
||||
const registration = await this.registrations.get(key);
|
||||
|
||||
if (runData && webhook.node in runData) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (registration && !webhook.webhookId) {
|
||||
throw new WebhookPathTakenError(webhook.node);
|
||||
}
|
||||
|
||||
@@ -320,6 +320,7 @@ export class WorkflowService {
|
||||
user.id,
|
||||
workflowData,
|
||||
additionalData,
|
||||
runData,
|
||||
sessionId,
|
||||
destinationNode,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user