Fixup priorities

This commit is contained in:
Vlad Grigorescu 2021-04-26 21:46:18 -05:00
parent f8b06becd2
commit 6d0f48abfc
3 changed files with 7 additions and 4 deletions

View file

@ -18,7 +18,8 @@ export {
};
}
hook notice(n: Notice::Info) &priority=-5
# Run before ACTION_PAGE
hook notice(n: Notice::Info) &priority=5
{
if ( |Site::local_admins| > 0 &&
ACTION_EMAIL_ADMIN in n$actions )
@ -28,7 +29,7 @@ hook notice(n: Notice::Info) &priority=-5
email = fmt("%s, %s", email, Site::get_emails(n$src));
if ( n?$dst && |Site::get_emails(n$dst)| > 0 )
email = fmt("%s, %s", email, Site::get_emails(n$dst));
if ( email != "" )
n$email_dest = email;
}

View file

@ -17,7 +17,8 @@ export {
option mail_page_dest = "";
}
hook notice(n: Notice::Info) &priority=-6
# Runs after EMAIL_ADMIN (assume page supercedes), but before hostnames are added.
hook notice(n: Notice::Info) &priority=4
{
if ( ACTION_PAGE in n$actions )
n$email_dest = mail_page_dest;