aboutsummaryrefslogtreecommitdiffstats
path: root/news2mail.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2015-01-03 00:03:58 +0100
committerMatěj Cepl <mcepl@cepl.eu>2015-01-03 00:03:58 +0100
commitbc74057f5b075e4eab2aa6698821d33e1d97c7d5 (patch)
tree99afc55cee2f3042555bd673790eef77697ebadb /news2mail.py
parent5dd7a797b99fb51e9141fa0a72aaef01af8c9e53 (diff)
downloadpyg-bc74057f5b075e4eab2aa6698821d33e1d97c7d5.tar.gz
Add In-Reply-To header for news2mail.
Fixes #17
Diffstat (limited to 'news2mail.py')
-rw-r--r--news2mail.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/news2mail.py b/news2mail.py
index 4248be2..78d0ae4 100644
--- a/news2mail.py
+++ b/news2mail.py
@@ -116,6 +116,11 @@ class news2mail(object):
# It should put a real user@domain
self.heads_dict['Message-Id'] = 'pyg@puppapera.org'
+ if 'References' in self.message and \
+ 'In-Reply-To' not in self.message:
+ refs = self.message['References'].split()
+ self.message['In-Reply-To'] = refs[-1]
+
except KeyError, message:
print message