mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <lfleischer@archlinux.org>
This commit is contained in:
parent
c76499993f
commit
092e00f468
1 changed files with 4 additions and 1 deletions
|
@ -29,6 +29,9 @@ reply_to = config.get('notifications', 'reply-to')
|
||||||
def headers_cc(cclist):
|
def headers_cc(cclist):
|
||||||
return {'Cc': str.join(', ', cclist)}
|
return {'Cc': str.join(', ', cclist)}
|
||||||
|
|
||||||
|
def headers_msgid(thread_id):
|
||||||
|
return {'Message-ID': thread_id}
|
||||||
|
|
||||||
def headers_reply(thread_id):
|
def headers_reply(thread_id):
|
||||||
return {'In-Reply-To': thread_id, 'References': 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 = '[1] ' + user_uri + '\n'
|
||||||
refs += '[2] ' + pkgbase_uri + '\n'
|
refs += '[2] ' + pkgbase_uri + '\n'
|
||||||
thread_id = '<pkg-request-' + reqid + '@aur.archlinux.org>'
|
thread_id = '<pkg-request-' + reqid + '@aur.archlinux.org>'
|
||||||
headers = headers_reply(thread_id) + headers_cc(cc)
|
headers = headers_msgid(thread_id) + headers_cc(cc)
|
||||||
|
|
||||||
send_notification(to, subject, body, refs, headers)
|
send_notification(to, subject, body, refs, headers)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue