From d0425e4cd84bd576125b2f2b90ebc15911b5f904 Mon Sep 17 00:00:00 2001 From: Jann Horn Date: Mon, 2 Sep 2024 02:57:21 +0200 Subject: [PATCH] fix duplicate message handling --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index 3481978..b1904c6 100755 --- a/main.py +++ b/main.py @@ -325,6 +325,9 @@ def parse_mbox(mail_path): message_index = 0 for msg in mbox: tmsg = ThreadMessage(msg, message_index) + # skip duplicate messages + if tmsg.id in messages_by_id: + continue message_index += 1 messages_by_id[tmsg.id] = tmsg #print('have message "'+tmsg.id+'"') -- 2.20.1