mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add recipient_id in redis key, fix redis value check and add TODO comment. (#6240)
This commit is contained in:
parent
9c3acf2f06
commit
c1128f6dea
9 changed files with 14 additions and 13 deletions
|
|
@ -138,7 +138,7 @@ function discord.dequeueRecipientAlerts(recipient, budget)
|
|||
for i=1, max_alerts_per_request do
|
||||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
|
||||
notifications[#notifications + 1] = notification.alert
|
||||
end
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ function email.dequeueRecipientAlerts(recipient, budget)
|
|||
for i = 1, MAX_ALERTS_PER_EMAIL do
|
||||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
notifications[#notifications + 1] = notification.alert
|
||||
end
|
||||
else
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ function mattermost.dequeueRecipientAlerts(recipient, budget)
|
|||
for i=1, max_alerts_per_request do
|
||||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
|
||||
notifications[#notifications + 1] = notification.alert
|
||||
end
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ function shell.dequeueRecipientAlerts(recipient, budget)
|
|||
for i = 1, MAX_ALERTS_PER_REQUEST do
|
||||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
|
||||
notifications[#notifications + 1] = notification.alert
|
||||
end
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ function slack.dequeueRecipientAlerts(recipient, budget)
|
|||
for i = 1, budget do
|
||||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
|
||||
notifications[#notifications + 1] = notification.alert
|
||||
end
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ function syslog.dequeueRecipientAlerts(recipient, budget)
|
|||
for i = 1, budget do
|
||||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
|
||||
notifications[#notifications + 1] = notification
|
||||
end
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ function telegram.dequeueRecipientAlerts(recipient, budget)
|
|||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
notifications[#notifications + 1] = notification.alert
|
||||
else
|
||||
break
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ function webhook.dequeueRecipientAlerts(recipient, budget)
|
|||
for i = 1, MAX_ALERTS_PER_REQUEST do
|
||||
local notification = ntop.recipient_dequeue(recipient.recipient_id)
|
||||
if notification then
|
||||
if alert_utils.filter_notification(notification) then
|
||||
if alert_utils.filter_notification(notification, recipient.recipient_id) then
|
||||
|
||||
notifications[#notifications + 1] = notification.alert
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue