Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions AlertSender.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,16 @@ try {
Write-LogMessage -Tag 'WARN' -Message "Unable to determine 'mention on warning' configuration. User will not be mentioned."
}

## On success
try {
if ($Config.mentions.on_success -and $status -eq 'Success') {
$mention = $true
}
}
catch {
Write-LogMessage -Tag 'WARN' -Message "Unable to determine 'mention on success' configuration. User will not be mentioned."
}


# Define footer message.
$footerMessage = "tigattack's VeeamNotify $($updateStatus.CurrentVersion)"
Expand Down
3 changes: 2 additions & 1 deletion config/conf.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
},
"mentions": {
"on_failure": false,
"on_warning": false
"on_warning": false,
"on_success": false
},
"notifications": {
"on_success": true,
Expand Down
3 changes: 3 additions & 0 deletions config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
},
"on_warning": {
"type": "boolean"
},
"on_success": {
"type": "boolean"
}
}
},
Expand Down
Loading