Reworks notifications to avoid JSON-decode to read severity

This commit is contained in:
Simone Mainardi 2020-12-15 16:52:32 +01:00
parent 426d626331
commit 3b202121f6
19 changed files with 92 additions and 102 deletions

View file

@ -105,7 +105,7 @@ function webhook.dequeueRecipientAlerts(recipient, budget, high_priority)
for i = 1, MAX_ALERTS_PER_REQUEST do
local notification = ntop.recipient_dequeue(recipient.recipient_id, high_priority)
if notification then
notifications[#notifications + 1] = notification
notifications[#notifications + 1] = notification.alert
else
break
end