aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-11-24 15:20:20 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-11-24 15:45:44 +0300
commitf73c92c8e4f36415901d7016f19b9f7df2648521 (patch)
treec1e98627689e3bb5d33f4b5310837dfec3b0c5b3
parenteb8e148edcfae43ec33f04a7aa647a9fa07cfb9f (diff)
Don't send build notification if build-email package manifest value is unspecified
-rw-r--r--mod/mod-build-result.cxx23
1 files 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<email>& 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<email> 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);