manual commit 2026-04-10T20:16:18Z
This commit is contained in:
@@ -276,7 +276,6 @@ 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 || '');
|
|
||||||
|
|
||||||
// Get staff signature if userId provided
|
// Get staff signature if userId provided
|
||||||
let signatureBlocks = { text: '', html: '' };
|
let signatureBlocks = { text: '', html: '' };
|
||||||
@@ -284,23 +283,26 @@ async function sendGmailReply(
|
|||||||
signatureBlocks = await getStaffSignatureBlocks(userId);
|
signatureBlocks = await getStaffSignatureBlocks(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const companySignatureHtml = `
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding-right: 12px;">
|
||||||
|
${safeLogoUrl ? `<img src="${safeLogoUrl}" width="65">` : ''}
|
||||||
|
</td>
|
||||||
|
<td style="border-left: 1px solid #ddd; padding-left: 12px;">
|
||||||
|
<p style="margin: 0; font-weight: bold;">${safeUser}</p>
|
||||||
|
<div style="color: #666; font-size: 12px;">${escapeHtml(CONFIG.SIGNATURE || '').replace(/\n/g, '<br>')}</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>`;
|
||||||
|
|
||||||
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>
|
||||||
<p>${safeReply}</p>
|
<p>${safeReply}</p>
|
||||||
|
${signatureBlocks.html ? `<p style="margin: 10px 0;">${signatureBlocks.html.replace(/\n/g, '<br>')}</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">
|
${companySignatureHtml}
|
||||||
<tr>
|
|
||||||
<td style="padding-right: 12px;">
|
|
||||||
${safeLogoUrl ? `<img src="${safeLogoUrl}" width="65">` : ''}
|
|
||||||
</td>
|
|
||||||
<td style="border-left: 1px solid #ddd; padding-left: 12px;">
|
|
||||||
${signatureBlocks.html || `<p style="margin: 0; font-weight: bold;">${safeUser}</p>`}
|
|
||||||
${signatureBlocks.html ? '<hr style="border:none; border-top:1px solid #ddd; margin:10px 0;">' : ''}
|
|
||||||
${signatureBlocks.html ? signatureBlocks.html : `<div style="color: #666; font-size: 12px;">${safeSignature}</div>`}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
const headers = [
|
const headers = [
|
||||||
|
|||||||
Reference in New Issue
Block a user