mirror of
https://github.com/pulb/mailnag.git
synced 2026-05-07 12:35:44 +02:00
include datetime when generating a hashed fallback id
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user