From 9ead0d56c5f282d700181873b185c4e868f09350 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Thu, 7 May 2020 15:18:47 -0400 Subject: Match applied patches using message-id Track message-id for each patch and try to apply to the Link: or Message-Id: trailers, if we find them. Suggested-by: Jason Gunthorpe Signed-off-by: Konstantin Ryabitsev --- b4/mbox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'b4/mbox.py') diff --git a/b4/mbox.py b/b4/mbox.py index a859c21..45f78f7 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -197,14 +197,14 @@ def thanks_record_am(lser): if pmsg.attestation is None: logger.debug('Unable to get hashes for all patches, not tracking for thanks') return - patches.append((pmsg.subject, pmsg.pwhash)) + patches.append((pmsg.subject, pmsg.pwhash, pmsg.msgid)) lmsg = lser.patches[0] if lmsg is None: lmsg = lser.patches[1] - allto = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('to', [])]) - allcc = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('cc', [])]) + allto = email.utils.getaddresses([b4.LoreMessage.clean_header(x) for x in lmsg.msg.get_all('to', [])]) + allcc = email.utils.getaddresses([b4.LoreMessage.clean_header(x) for x in lmsg.msg.get_all('cc', [])]) out = { 'msgid': lmsg.msgid, -- cgit v1.2.3