Browse Source

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.
pull/4345/head
Daniel Gibbs 2 years ago
parent
commit
e75092734e
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 4
      lgsm/modules/alert_discord.sh
  2. 8
      lgsm/modules/alert_slack.sh

4
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}"
}
}
]

8
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
}
]

Loading…
Cancel
Save