mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 11:15:51 +00:00
Fixed cross account move without msgid
This commit is contained in:
parent
8e909de0b6
commit
07071a46d5
2 changed files with 7 additions and 10 deletions
|
@ -953,17 +953,9 @@ class Core {
|
|||
|
||||
Log.i(folder.name + " reading " + file);
|
||||
try (InputStream is = new BufferedInputStream(new FileInputStream(file))) {
|
||||
imessage = new MimeMessage(isession, is);
|
||||
}
|
||||
|
||||
// Check message ID to check raw message file content
|
||||
MessageHelper helper = new MessageHelper(imessage, context);
|
||||
String msgid = helper.getMessageID();
|
||||
if (TextUtils.isEmpty(message.msgid) || !Objects.equals(message.msgid, msgid)) {
|
||||
String msg = "Inconsistent msgid=" + message.msgid + "/" + msgid;
|
||||
Log.e(msg);
|
||||
throw new IllegalArgumentException(msg);
|
||||
imessage = new MimeMessageEx(isession, is, message.msgid);
|
||||
}
|
||||
imessage.saveChanges();
|
||||
}
|
||||
|
||||
db.message().setMessageRaw(message.id, true);
|
||||
|
|
|
@ -35,6 +35,11 @@ public class MimeMessageEx extends MimeMessage {
|
|||
this.msgid = msgid;
|
||||
}
|
||||
|
||||
MimeMessageEx(Session session, InputStream is, String msgid) throws MessagingException {
|
||||
super(session, is);
|
||||
this.msgid = msgid;
|
||||
}
|
||||
|
||||
MimeMessageEx(Session session, InputStream is, MimeMessage original) throws MessagingException {
|
||||
super(session, is);
|
||||
this.original = original;
|
||||
|
|
Loading…
Reference in a new issue