diff --git a/src/api/integrations/chatbot/n8n/services/n8n.service.ts b/src/api/integrations/chatbot/n8n/services/n8n.service.ts index f1a6c387d..7da8ac28b 100644 --- a/src/api/integrations/chatbot/n8n/services/n8n.service.ts +++ b/src/api/integrations/chatbot/n8n/services/n8n.service.ts @@ -51,6 +51,7 @@ export class N8nService extends BaseChatbotService { pushName: pushName, keyId: msg?.key?.id, fromMe: msg?.key?.fromMe, + quotedMessage: msg?.contextInfo?.quotedMessage, instanceName: instance.instanceName, serverUrl: this.configService.get('SERVER').URL, apiKey: instance.token, diff --git a/src/utils/makeProxyAgent.ts b/src/utils/makeProxyAgent.ts index 989fc95e4..80fa4d856 100644 --- a/src/utils/makeProxyAgent.ts +++ b/src/utils/makeProxyAgent.ts @@ -56,7 +56,7 @@ export function makeProxyAgent(proxy: Proxy | string): HttpsProxyAgent | return selectProxyAgent(proxyUrl); } -export function makeProxyAgentUndici(proxy: Proxy | string) { +export function makeProxyAgentUndici(proxy: Proxy | string): ProxyAgent { let proxyUrl: string; let protocol: string; @@ -67,7 +67,10 @@ export function makeProxyAgentUndici(proxy: Proxy | string) { } else { const { host, password, port, protocol: proto, username } = proxy; protocol = (proto || 'http').replace(':', ''); - if (protocol === 'socks') protocol = 'socks5'; + + if (protocol === 'socks') { + protocol = 'socks5'; + } const auth = username && password ? `${username}:${password}@` : ''; proxyUrl = `${protocol}://${auth}${host}:${port}`;