feat: Add id as reserved field in templates, campaigns and workflows
This commit is contained in:
@@ -44,6 +44,7 @@ interface EmailEditorProps {
|
||||
}
|
||||
|
||||
const commonVariables = [
|
||||
{name: 'id', description: 'Contact ID'},
|
||||
{name: 'email', description: 'Recipient email address'},
|
||||
{name: 'unsubscribeUrl', description: 'Unsubscribe link'},
|
||||
{name: 'subscribeUrl', description: 'Subscribe link'},
|
||||
|
||||
@@ -117,7 +117,7 @@ export const VariableMention = Mention.configure({
|
||||
|
||||
items: ({query}) => {
|
||||
const safeVariables = Array.isArray(availableVariables) ? availableVariables : [];
|
||||
const allVariables = ['email', 'unsubscribeUrl', 'subscribeUrl', 'manageUrl', 'locale', ...safeVariables];
|
||||
const allVariables = ['id', 'email', 'unsubscribeUrl', 'subscribeUrl', 'manageUrl', 'locale', ...safeVariables];
|
||||
const uniqueVariables = Array.from(new Set(allVariables)).filter(v => typeof v === 'string');
|
||||
|
||||
if (!query) {
|
||||
|
||||
Reference in New Issue
Block a user