Quick fix for alerting (#15060)

This commit is contained in:
Tony Murray 2023-05-24 08:24:05 -05:00 committed by GitHub
parent 075267dcc9
commit 0c93132588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,7 @@
namespace LibreNMS\Alert;
use App\Facades\DeviceCache;
use App\Models\AlertTransport;
use App\Models\Eventlog;
use LibreNMS\Config;
use LibreNMS\Enum\Alert;
@ -506,7 +507,7 @@ class RunAlerts
$obj['msg'] = $type->getBody($obj);
c_echo(" :: $transport_title => ");
try {
$instance = new $class($item['transport_id']);
$instance = new $class(AlertTransport::find($item['transport_id']));
$tmp = $instance->deliverAlert($obj, $item['opts'] ?? []);
$this->alertLog($tmp, $obj, $obj['transport']);
} catch (AlertTransportDeliveryException $e) {