Commit b56d2917 authored by Colomban Wendling's avatar Colomban Wendling
Browse files

Fix mail thread grouping for separate check runs

Don't keep In-Reply-To between success/failure cycles not to have all
reports from a particular check in the same thread.

Fixes a bug introduced in the previous commit,
parent 3c3ca1cf
...@@ -135,7 +135,7 @@ def send_email_for_check(check, removed=False): ...@@ -135,7 +135,7 @@ def send_email_for_check(check, removed=False):
extra_headers = {} extra_headers = {}
extra_headers['Message-ID'] = make_msgid(type(check).__name__) extra_headers['Message-ID'] = make_msgid(type(check).__name__)
# if it's a follow up, set In-Reply-To # if it's a follow up, set In-Reply-To
if hasattr(check, 'mails_msgid'): if (check.ok or removed) and hasattr(check, 'mails_msgid'):
extra_headers['In-Reply-To'] = check.mails_msgid extra_headers['In-Reply-To'] = check.mails_msgid
extra_headers['References'] = check.mails_msgid extra_headers['References'] = check.mails_msgid
check.mails_msgid = extra_headers['Message-ID'] check.mails_msgid = extra_headers['Message-ID']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment