mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
feat: Human in the loop (#10675)
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
This commit is contained in:
@@ -18,20 +18,6 @@ import { DateTime } from 'luxon';
|
||||
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
|
||||
export interface IEmail {
|
||||
from?: string;
|
||||
to?: string;
|
||||
cc?: string;
|
||||
bcc?: string;
|
||||
replyTo?: string;
|
||||
inReplyTo?: string;
|
||||
reference?: string;
|
||||
subject: string;
|
||||
body: string;
|
||||
htmlBody?: string;
|
||||
attachments?: IDataObject[];
|
||||
}
|
||||
|
||||
export interface IAttachments {
|
||||
type: string;
|
||||
name: string;
|
||||
@@ -40,6 +26,8 @@ export interface IAttachments {
|
||||
|
||||
import MailComposer from 'nodemailer/lib/mail-composer';
|
||||
import { getGoogleAccessToken } from '../GenericFunctions';
|
||||
import { escapeHtml } from '../../../utils/utilities';
|
||||
import type { IEmail } from '../../../utils/sendAndWait/interfaces';
|
||||
|
||||
export async function googleApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
@@ -516,22 +504,7 @@ export function unescapeSnippets(items: INodeExecutionData[]) {
|
||||
const result = items.map((item) => {
|
||||
const snippet = item.json.snippet as string;
|
||||
if (snippet) {
|
||||
item.json.snippet = snippet.replace(/&|<|>|'|"/g, (match) => {
|
||||
switch (match) {
|
||||
case '&':
|
||||
return '&';
|
||||
case '<':
|
||||
return '<';
|
||||
case '>':
|
||||
return '>';
|
||||
case ''':
|
||||
return "'";
|
||||
case '"':
|
||||
return '"';
|
||||
default:
|
||||
return match;
|
||||
}
|
||||
});
|
||||
item.json.snippet = escapeHtml(snippet);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user