This commit is contained in:
romantarkin 2025-08-19 12:55:42 +05:00
parent 72a631c6c1
commit 393eb3523a

View File

@ -269,10 +269,6 @@ async function processEmailTask(task, topic) {
const htmlWithClickTracking = task.html.replace( const htmlWithClickTracking = task.html.replace(
/<a\s+href=["']([^"']+)["']/gi, /<a\s+href=["']([^"']+)["']/gi,
(match, url) => { (match, url) => {
// Не отслеживаем ссылки отписки
if (url.includes('/unsubscribe')) {
return match;
}
const trackingUrl = `https://${domain}/api/mail/track/click/${deliveryLog.id}?url=${encodeURIComponent(url)}`; const trackingUrl = `https://${domain}/api/mail/track/click/${deliveryLog.id}?url=${encodeURIComponent(url)}`;
return `<a href="${trackingUrl}"`; return `<a href="${trackingUrl}"`;
} }