From 092e00f4687dced8f4174891dd4cabd6d4c2617d Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 10 Oct 2015 17:26:26 +0200 Subject: notify: Fix references in request notifications When sending notifications upon request creation, set an initial message ID instead of setting the Reply-To and References headers. This used to work but the behavior was unintentionally changed in 9746a65 (Port notification routines to Python, 2015-06-27). Fixes FS#46645. Signed-off-by: Lukas Fleischer --- scripts/notify.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/notify.py b/scripts/notify.py index 4e04234..42a657e 100755 --- a/scripts/notify.py +++ b/scripts/notify.py @@ -29,6 +29,9 @@ reply_to = config.get('notifications', 'reply-to') def headers_cc(cclist): return {'Cc': str.join(', ', cclist)} +def headers_msgid(thread_id): + return {'Message-ID': thread_id} + def headers_reply(thread_id): return {'In-Reply-To': thread_id, 'References': thread_id} @@ -210,7 +213,7 @@ def request_open(cur, uid, reqid, reqtype, pkgbase_id, merge_into=None): refs = '[1] ' + user_uri + '\n' refs += '[2] ' + pkgbase_uri + '\n' thread_id = '' - headers = headers_reply(thread_id) + headers_cc(cc) + headers = headers_msgid(thread_id) + headers_cc(cc) send_notification(to, subject, body, refs, headers) -- cgit v1.2.3-70-g09d2