Workaround missing POP3 msgid

pull/184/head
M66B 4 years ago
parent 25ebfb11b6
commit c5572caff9

@ -1922,9 +1922,11 @@ class Core {
} }
msgid = uidlMsgId.get(uidl); msgid = uidlMsgId.get(uidl);
if (msgid == null) if (msgid == null) {
msgid = helper.getMessageID(); msgid = helper.getMessageID();
else { if (TextUtils.isEmpty(msgid))
msgid = uidl;
} else {
Log.i(folder.name + " POP having uidl=" + uidl); Log.i(folder.name + " POP having uidl=" + uidl);
continue; continue;
} }
@ -1932,18 +1934,24 @@ class Core {
uidl = null; uidl = null;
msgid = helper.getMessageID(); msgid = helper.getMessageID();
if (TextUtils.isEmpty(msgid)) {
Long time = helper.getReceived();
if (time == null)
time = helper.getSent();
if (time != null)
msgid = Long.toString(time);
}
if (db.message().countMessageByMsgId(folder.id, msgid) > 0) { if (db.message().countMessageByMsgId(folder.id, msgid) > 0) {
Log.i(folder.name + " POP having msgid=" + msgid); Log.i(folder.name + " POP having msgid=" + msgid);
continue; continue;
} }
} }
if (TextUtils.isEmpty(msgid)) if (TextUtils.isEmpty(msgid)) {
if (uidl == null) {
Log.w(folder.name + " POP no msgid"); Log.w(folder.name + " POP no msgid");
continue; continue;
} else }
msgid = uidl;
try { try {
Log.i(folder.name + " POP sync=" + uidl + "/" + msgid); Log.i(folder.name + " POP sync=" + uidl + "/" + msgid);

Loading…
Cancel
Save