Update msgid of duplicated messages

This commit is contained in:
M66B 2022-05-30 12:26:32 +02:00
parent c301903394
commit c982b2dc45
1 changed files with 9 additions and 0 deletions

View File

@ -1444,6 +1444,15 @@ class Core {
msgids.put(message, msgid);
icopy = new MimeMessageEx(isession, is, msgid);
icopy.saveChanges();
if (!copy) {
List<EntityMessage> tmps = db.message().getMessagesByMsgId(message.account, message.msgid);
for (EntityMessage tmp : tmps)
if (target.id.equals(tmp.folder)) {
db.message().setMessageMsgId(tmp.id, msgid);
break;
}
}
} else
icopy = new MimeMessage(isession, is);
}