Skip to content

Commit

Permalink
Quick fix for alerting (librenms#15060)
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant authored and TheMysteriousX committed Aug 9, 2023
1 parent 0373607 commit d3cde2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion LibreNMS/Alert/RunAlerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -506,7 +507,7 @@ public function extTransports($obj)
$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) {
Expand Down

0 comments on commit d3cde2b

Please sign in to comment.