include datetime when generating a hashed fallback id

This commit is contained in:
Patrick Ulbrich
2013-08-05 19:40:35 +02:00
parent 214adfb9ba
commit a89d3365ef

View File

@@ -139,7 +139,7 @@ class MailCollector:
if id == None or id == '':
# create fallback id
id = str(hash(acc.server + acc.user + sender[1] + subject))
id = str(hash(acc.server + acc.user + sender[1] + subject + str(datetime)))
# prevent duplicates caused by Gmail labels
if id not in mail_ids:
@@ -211,7 +211,7 @@ class MailCollector:
if uidl == None or uidl == '':
# create fallback id
id = str(hash(acc.server + acc.user + sender[1] + subject))
id = str(hash(acc.server + acc.user + sender[1] + subject + str(datetime)))
else:
# create unique id
id = acc.user + uidl.split(' ')[2]