mvp: neuter debug log helpers, strip config keys, update tagline

This commit is contained in:
2026-04-21 20:18:59 +00:00
parent 410f8b043e
commit 8e362c607d
5 changed files with 107 additions and 128 deletions

View File

@@ -123,12 +123,15 @@ async function runEscalation(interaction, ticket, nextTier, reason) {
if (!isDiscordTicket && ticket.gmailThreadId) {
try {
const emailBody = CONFIG.ESCALATION_MESSAGE.replace(/\\n/g, '\n').replace(/\{support_name\}/g, CONFIG.SUPPORT_NAME);
const escalatorName = interaction.member?.displayName || interaction.user.username;
const tierLabel = nextTier === 1 ? 'tier 2' : 'tier 3';
const emailBody = `${escalatorName} escalated this ticket to ${tierLabel}.${reason ? `\n\nReason: ${reason}` : ''}`;
await sendTicketNotificationEmail(
ticket,
`Ticket escalated to ${nextTier === 1 ? 'tier 2' : 'tier 3'}`,
null,
emailBody,
interaction.member?.displayName || interaction.user.username
escalatorName,
interaction.user.id
);
} catch (emailErr) {
console.error('Escalation email failed (non-fatal):', emailErr.message);