diff --git a/LibreNMS/Alert/Transport/Mattermost.php b/LibreNMS/Alert/Transport/Mattermost.php index 35cb0bd7cd..1d5085231e 100755 --- a/LibreNMS/Alert/Transport/Mattermost.php +++ b/LibreNMS/Alert/Transport/Mattermost.php @@ -45,7 +45,7 @@ class Mattermost extends Transport $host = $api['url']; $curl = curl_init(); $mattermost_msg = strip_tags($obj['msg']); - $color = ($obj['state'] == 0 ? '#00FF00' : '#FF0000'); + $color = self::getColorForState($obj['state']); $data = [ 'attachments' => [ 0 => [