mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Fix nil check on mattermost endpoint. (#8152)
This commit is contained in:
parent
411f086d6f
commit
f658d8d58f
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ function mattermost.sendMattermost(message_body,settings)
|
|||
|
||||
local msg = message_body
|
||||
local body = json.encode({channel_id = settings.mattermost_channel, message = msg})
|
||||
if (body.message.alert_type ~= nil)
|
||||
if (body ~= nil)
|
||||
then
|
||||
-- Only if a custom alert is thrown this script will be run
|
||||
local post_rc = ntop.postHTTPJsonData("", "", settings.url, body, nil, settings.mattermost_token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue