manual commit 2026-04-10T19:57:09Z
This commit is contained in:
@@ -30,7 +30,7 @@ async function sendGmailReply(
|
|||||||
const safeUser = escapeHtml(discordUser);
|
const safeUser = escapeHtml(discordUser);
|
||||||
const safeReply = escapeHtml(replyText).replace(/\n/g, '<br>');
|
const safeReply = escapeHtml(replyText).replace(/\n/g, '<br>');
|
||||||
const safeLogoUrl = escapeHtml(CONFIG.LOGO_URL || '');
|
const safeLogoUrl = escapeHtml(CONFIG.LOGO_URL || '');
|
||||||
const safeSignature = escapeHtml(CONFIG.SIGNATURE || '');
|
const safeSignature = escapeHtml(CONFIG.SIGNATURE || '').replace(/\n/g, '<br>');
|
||||||
const htmlBody = `
|
const htmlBody = `
|
||||||
<div style="font-family: sans-serif; font-size: 14px; color: #333;">
|
<div style="font-family: sans-serif; font-size: 14px; color: #333;">
|
||||||
<p><strong>From:</strong> ${safeUser} on Discord</p>
|
<p><strong>From:</strong> ${safeUser} on Discord</p>
|
||||||
@@ -106,14 +106,11 @@ async function sendTicketClosedEmail(ticket, discordDisplayName) {
|
|||||||
|
|
||||||
const serverDisplayName = escapeHtml(discordDisplayName || 'Support');
|
const serverDisplayName = escapeHtml(discordDisplayName || 'Support');
|
||||||
const safeLogoUrl = escapeHtml(CONFIG.LOGO_URL || '');
|
const safeLogoUrl = escapeHtml(CONFIG.LOGO_URL || '');
|
||||||
const safeSignature = escapeHtml(CONFIG.SIGNATURE || '');
|
const safeSignature = escapeHtml(CONFIG.SIGNATURE || '').replace(/\n/g, '<br>');
|
||||||
const safeCloseMessage = escapeHtml(CONFIG.TICKET_CLOSE_MESSAGE || '').replace(/\n/g, '<br>');
|
|
||||||
const safeCloseSignature = escapeHtml(CONFIG.TICKET_CLOSE_SIGNATURE || '');
|
|
||||||
|
|
||||||
const htmlBody = `
|
const htmlBody = `
|
||||||
<div style="font-family: sans-serif; font-size: 14px; color: #333;">
|
<div style="font-family: sans-serif; font-size: 14px; color: #333;">
|
||||||
<p><strong>From:</strong> ${serverDisplayName} on Discord</p>
|
<p><strong>From:</strong> ${serverDisplayName} on Discord</p>
|
||||||
<p><strong>Message:</strong></p>
|
<p><strong>Message:</</strong></p>
|
||||||
<p>${safeCloseMessage}</p>
|
<p>${safeCloseMessage}</p>
|
||||||
<p style="margin-top: 16px;">${safeCloseSignature}</p>
|
<p style="margin-top: 16px;">${safeCloseSignature}</p>
|
||||||
<hr style="border:none; border-top:1px solid #ddd; margin:20px 0;">
|
<hr style="border:none; border-top:1px solid #ddd; margin:20px 0;">
|
||||||
@@ -203,11 +200,13 @@ async function sendTicketNotificationEmail(ticket, subjectLine, messageBody, fro
|
|||||||
signatureBlocks = await getStaffSignatureBlocks(userId);
|
signatureBlocks = await getStaffSignatureBlocks(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
const safeSignature = escapeHtml(CONFIG.SIGNATURE || '');
|
const safeSignature = escapeHtml(CONFIG.SIGNATURE || '').replace(/\n/g, '<br>');
|
||||||
const htmlBody = `
|
const htmlBody = `
|
||||||
<div style="font-family: sans-serif; font-size: 14px; color: #333;">
|
<div style="font-family: sans-serif; font-size: 14px; color: #333;">
|
||||||
<p><strong>From:</strong> ${label} on Discord</p>
|
<p><strong>From:</strong> ${serverDisplayName} on Discord</p>
|
||||||
<p>${safeBody}</p>
|
<p><strong>Message:</strong></p>
|
||||||
|
<p>${safeCloseMessage}</p>
|
||||||
|
<p style="margin-top: 16px;">${safeCloseSignature}</p>
|
||||||
<hr style="border:none; border-top:1px solid #ddd; margin:20px 0;">
|
<hr style="border:none; border-top:1px solid #ddd; margin:20px 0;">
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -215,9 +214,8 @@ async function sendTicketNotificationEmail(ticket, subjectLine, messageBody, fro
|
|||||||
${safeLogoUrl ? `<img src="${safeLogoUrl}" width="65">` : ''}
|
${safeLogoUrl ? `<img src="${safeLogoUrl}" width="65">` : ''}
|
||||||
</td>
|
</td>
|
||||||
<td style="border-left: 1px solid #ddd; padding-left: 12px;">
|
<td style="border-left: 1px solid #ddd; padding-left: 12px;">
|
||||||
${signatureBlocks.html || `<p style="margin: 0; font-weight: bold;">${label}</p>`}
|
<p style="margin: 0; font-weight: bold;">${serverDisplayName}</p>
|
||||||
${signatureBlocks.html ? '<hr style="border:none; border-top:1px solid #ddd; margin:10px 0;">' : ''}
|
<div style="color: #666; font-size: 12px;">${safeSignature}</div>
|
||||||
${signatureBlocks.html ? signatureBlocks.html : `<div style="color: #666; font-size: 12px;">${safeSignature}</div>`}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user