Skip to content

Commit

Permalink
refactor: remove date from alert messages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dgibbs64 committed Oct 19, 2023
1 parent af08ac1 commit e750927
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lgsm/modules/alert_discord.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
}
]
Expand Down Expand Up @@ -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}"
}
}
]
Expand Down
8 changes: 4 additions & 4 deletions lgsm/modules/alert_slack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jsonnoinfo=$(
{
"type": "header",
"text": {
"type": "plain_text",
"type": "mrkdwn",
"text": "${alerttitle}",
"emoji": true
}
Expand Down Expand Up @@ -75,7 +75,7 @@ jsonnoinfo=$(
},
{
"type": "plain_text",
"text": "Sent by LinuxGSM ${version} - $(date)",
"text": "Sent by LinuxGSM ${version}",
"emoji": true
}
]
Expand All @@ -97,7 +97,7 @@ jsoninfo=$(
{
"type": "header",
"text": {
"type": "plain_text",
"type": "mrkdwn",
"text": "${alerttitle}",
"emoji": true
}
Expand Down Expand Up @@ -162,7 +162,7 @@ jsoninfo=$(
},
{
"type": "plain_text",
"text": "Sent by LinuxGSM ${version} - $(date)",
"text": "Sent by LinuxGSM ${version}",
"emoji": true
}
]
Expand Down

0 comments on commit e750927

Please sign in to comment.