From f73c92c8e4f36415901d7016f19b9f7df2648521 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 24 Nov 2020 15:20:20 +0300 Subject: Don't send build notification if build-email package manifest value is unspecified --- mod/mod-build-result.cxx | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/mod/mod-build-result.cxx b/mod/mod-build-result.cxx index 734ea5c..8a684fe 100644 --- a/mod/mod-build-result.cxx +++ b/mod/mod-build-result.cxx @@ -491,27 +491,12 @@ handle (request& rq, response&) } }; - // Don't send the build notification email if the empty package build email - // is specified. + // Send the build notification email if a non-empty package build email is + // specified. // optional& build_email (pkg->build_email); - if (build_notify && (!build_email || !build_email->empty ())) - { - // If none of the package build-* addresses is specified, then the build - // email address is assumed to be the same as the package email address, - // if specified, otherwise as the project email address, if specified, - // otherwise the notification email is not sent. - // - optional to; - - if (build_email) - to = move (build_email); - else if (!pkg->build_warning_email && !pkg->build_error_email) - to = move (pkg->package_email ? pkg->package_email : pkg->email); - - if (to) - send_email (*to); - } + if (build_notify && build_email && !build_email->empty ()) + send_email (*pkg->build_email); assert (bld->status); -- cgit v1.1