dockerfile and escalation change
This commit is contained in:
@@ -203,7 +203,7 @@ async function handleButton(interaction) {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
await runEscalation(interaction, ticket, 1, 'Escalated via button (Tier 2)');
|
await runEscalation(interaction, ticket, 1, null);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
trackError('escalate-button-tier2', err, interaction);
|
trackError('escalate-button-tier2', err, interaction);
|
||||||
await interaction.editReply({ content: 'Failed to escalate to tier 2.' }).catch(() =>
|
await interaction.editReply({ content: 'Failed to escalate to tier 2.' }).catch(() =>
|
||||||
@@ -226,7 +226,7 @@ async function handleButton(interaction) {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
await runEscalation(interaction, ticket, 2, 'Escalated via button (Tier 3)');
|
await runEscalation(interaction, ticket, 2, null);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
trackError('escalate-button-tier3', err, interaction);
|
trackError('escalate-button-tier3', err, interaction);
|
||||||
await interaction.editReply({ content: 'Failed to escalate to tier 3.' }).catch(() =>
|
await interaction.editReply({ content: 'Failed to escalate to tier 3.' }).catch(() =>
|
||||||
|
|||||||
@@ -125,8 +125,8 @@ async function runEscalation(interaction, ticket, nextTier, reason) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const escalationBody = CONFIG.ESCALATION_MESSAGE
|
const escalationBody = CONFIG.ESCALATION_MESSAGE
|
||||||
.replace(/\{support_name\}/g, CONFIG.SUPPORT_NAME)
|
.replace(/\\n/g, '\n')
|
||||||
+ (reason ? `\n\n**Reason:** ${reason}` : '');
|
.replace(/\{support_name\}/g, CONFIG.SUPPORT_NAME);
|
||||||
const escalatedEmbed = new EmbedBuilder()
|
const escalatedEmbed = new EmbedBuilder()
|
||||||
.setTitle(`🚨 Escalated to ${nextTier === 1 ? 'Tier 2' : 'Tier 3'} Support`)
|
.setTitle(`🚨 Escalated to ${nextTier === 1 ? 'Tier 2' : 'Tier 3'} Support`)
|
||||||
.setDescription(escalationBody)
|
.setDescription(escalationBody)
|
||||||
@@ -147,7 +147,7 @@ async function runEscalation(interaction, ticket, nextTier, reason) {
|
|||||||
|
|
||||||
if (!isDiscordTicket && ticket.gmailThreadId) {
|
if (!isDiscordTicket && ticket.gmailThreadId) {
|
||||||
try {
|
try {
|
||||||
const emailBody = CONFIG.ESCALATION_MESSAGE.replace(/\{support_name\}/g, CONFIG.SUPPORT_NAME) + (reason ? `\n\nReason: ${reason}` : '');
|
const emailBody = CONFIG.ESCALATION_MESSAGE.replace(/\\n/g, '\n').replace(/\{support_name\}/g, CONFIG.SUPPORT_NAME);
|
||||||
await sendTicketNotificationEmail(
|
await sendTicketNotificationEmail(
|
||||||
ticket,
|
ticket,
|
||||||
`Ticket escalated to ${nextTier === 1 ? 'tier 2' : 'tier 3'}`,
|
`Ticket escalated to ${nextTier === 1 ? 'tier 2' : 'tier 3'}`,
|
||||||
|
|||||||
12
settings-site/Dockerfile
Normal file
12
settings-site/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
EXPOSE 12752
|
||||||
|
|
||||||
|
CMD ["node", "server.js"]
|
||||||
Reference in New Issue
Block a user