From e75092734e78d5ccb0583bf900570d160c503100 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 19 Oct 2023 20:41:38 +0100 Subject: [PATCH] refactor: remove date from alert messages The commit refactors the code in `alert_discord.sh` and `alert_slack.sh` to remove the date from the alert messages sent by LinuxGSM. This change simplifies the message content while still indicating that it was sent by LinuxGSM and includes the version number. --- lgsm/modules/alert_discord.sh | 4 ++-- lgsm/modules/alert_slack.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index e8d7d7a9cb..54cf8a3483 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -65,7 +65,7 @@ jsoninfo=$( ], "footer": { "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "text": "Sent by LinuxGSM ${version} - $(date)" + "text": "Sent by LinuxGSM ${version}" } } ] @@ -126,7 +126,7 @@ jsonnoinfo=$( ], "footer": { "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "text": "Sent by LinuxGSM ${version} - $(date)" + "text": "Sent by LinuxGSM ${version}" } } ] diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index f3e45dd83b..728a564e02 100644 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -17,7 +17,7 @@ jsonnoinfo=$( { "type": "header", "text": { - "type": "plain_text", + "type": "mrkdwn", "text": "${alerttitle}", "emoji": true } @@ -75,7 +75,7 @@ jsonnoinfo=$( }, { "type": "plain_text", - "text": "Sent by LinuxGSM ${version} - $(date)", + "text": "Sent by LinuxGSM ${version}", "emoji": true } ] @@ -97,7 +97,7 @@ jsoninfo=$( { "type": "header", "text": { - "type": "plain_text", + "type": "mrkdwn", "text": "${alerttitle}", "emoji": true } @@ -162,7 +162,7 @@ jsoninfo=$( }, { "type": "plain_text", - "text": "Sent by LinuxGSM ${version} - $(date)", + "text": "Sent by LinuxGSM ${version}", "emoji": true } ]