Add more VS and email debug

This commit is contained in:
Alfredo Cardigliano 2023-11-07 11:19:59 +01:00
parent d13e92ecf2
commit f3eb3303fa
3 changed files with 34 additions and 13 deletions

View file

@ -164,10 +164,20 @@ function email.dequeueRecipientAlerts(recipient, budget)
local notification = ntop.recipient_dequeue(recipient.recipient_id)
if notification then
if debug_endpoint then
tprint("Email: dequeued notification")
tprint(notification)
end
if alert_utils.filter_notification(notification, recipient.recipient_id) then
local notif = json.decode(notification.alert)
if debug_endpoint then
tprint("Email: notification matched the filter")
end
notifications[#notifications + 1] = notif
i = i + 1