Expand the tests, and have email_admin email src contacts in one e-mail, and dst contacts in another.

This commit is contained in:
Vlad Grigorescu 2021-06-17 14:49:24 -05:00
parent 9d0bd96e1f
commit 9d1e9a20e4
4 changed files with 38 additions and 12 deletions

View file

@ -25,16 +25,8 @@ hook notice(n: Notice::Info)
{
local email = "";
if ( n?$src && |Site::get_emails(n$src)| > 0 )
email = Site::get_emails(n$src);
add n$email_dest[Site::get_emails(n$src)];
if ( n?$dst && |Site::get_emails(n$dst)| > 0 )
{
if ( email != "" )
email = fmt("%s, %s", email, Site::get_emails(n$dst));
else
email = Site::get_emails(n$dst);
}
if ( email != "" )
add n$email_dest[email];
add n$email_dest[Site::get_emails(n$dst)];
}
}