From d1045556f2ddc9209d371bb38cfef99b636bfad8 Mon Sep 17 00:00:00 2001 From: Corentin Normand Date: Thu, 20 Jul 2023 23:54:20 +0200 Subject: [PATCH] feat(discord.ts): adds a link to the pending approval discord notification --- server/lib/notifications/agents/discord.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/lib/notifications/agents/discord.ts b/server/lib/notifications/agents/discord.ts index 67a278bfb..e1fba809d 100644 --- a/server/lib/notifications/agents/discord.ts +++ b/server/lib/notifications/agents/discord.ts @@ -111,6 +111,8 @@ class DiscordAgent ): DiscordRichEmbed { const { applicationUrl } = getSettings().main; + const appUrl = + applicationUrl || `http://localhost:${process.env.port || 5055}`; let color = EmbedColors.DARK_PURPLE; const fields: Field[] = []; @@ -125,7 +127,7 @@ class DiscordAgent switch (type) { case Notification.MEDIA_PENDING: color = EmbedColors.ORANGE; - status = 'Pending Approval'; + status = `[Pending Approval](${appUrl}/requests)`; break; case Notification.MEDIA_APPROVED: case Notification.MEDIA_AUTO_APPROVED: