From 8352d9abbece3608bc75b6f3930bb23d4c5e1f6a Mon Sep 17 00:00:00 2001 From: Denis Freund Date: Sun, 12 Sep 2021 17:54:12 +0200 Subject: [PATCH] add posibility to have a prefixMessage before the embed --- server/notification-providers/discord.js | 10 ++++++++++ src/components/NotificationDialog.vue | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/server/notification-providers/discord.js b/server/notification-providers/discord.js index d6ee0afe..971c26e5 100644 --- a/server/notification-providers/discord.js +++ b/server/notification-providers/discord.js @@ -62,6 +62,11 @@ class Discord extends NotificationProvider { ], }], } + + if (notification.discordPrefixMessage) { + discorddowndata.content = notification.discordPrefixMessage; + } + await axios.post(notification.discordWebhookUrl, discorddowndata) return okMsg; @@ -92,6 +97,11 @@ class Discord extends NotificationProvider { ], }], } + + if (notification.discordPrefixMessage) { + discordupdata.content = notification.discordPrefixMessage; + } + await axios.post(notification.discordWebhookUrl, discordupdata) return okMsg; } diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index ffb7ba71..0dff26b3 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -80,6 +80,11 @@ + +
+ + +