Supervisor added blacklist to avoid mail twice
Former-commit-id: e2f03306076d90f9abe312694ea1fa2298ee7c62
This commit is contained in:
parent
42b0afb884
commit
e90d4b7256
|
@ -356,6 +356,7 @@ class ConsoleSupervisor
|
|||
bool $update=false
|
||||
) {
|
||||
$notification_id = $notification['id_mensaje'];
|
||||
$blacklist = [];
|
||||
|
||||
if (is_array($this->targetUsers) === true
|
||||
&& count($this->targetUsers) > 0
|
||||
|
@ -382,6 +383,7 @@ class ConsoleSupervisor
|
|||
io_safe_output($notification['subject']),
|
||||
]
|
||||
);
|
||||
array_push($blacklist, $user['id_user']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -407,13 +409,14 @@ class ConsoleSupervisor
|
|||
if ($update === false) {
|
||||
// Send mail.
|
||||
if (isset($group['also_mail']) && $group['also_mail'] == 1) {
|
||||
$this->warn('Mailing group: '.$group['id_group']."\n");
|
||||
enterprise_hook(
|
||||
'send_email_group',
|
||||
[
|
||||
$group['id_group'],
|
||||
io_safe_output($notification['mensaje']).'<br><hl><br>'.$notification['url'],
|
||||
io_safe_output($notification['subject']),
|
||||
null,
|
||||
$blacklist,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue