pull/194/merge
M66B 3 years ago
parent 1cb818d741
commit e66ecf8f71

@ -1399,27 +1399,28 @@ public class MessageHelper {
} }
// https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxomsg/9e994fbb-b839-495f-84e3-2c8c02c7dd9b // https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxomsg/9e994fbb-b839-495f-84e3-2c8c02c7dd9b
String tindex = imessage.getHeader("Thread-Index", null); if (BuildConfig.DEBUG)
try { try {
if (tindex != null) { String tindex = imessage.getHeader("Thread-Index", null);
boolean outlook_thread_id = prefs.getBoolean("outlook_thread_id", false); if (tindex != null) {
if (outlook_thread_id) { boolean outlook_thread_id = prefs.getBoolean("outlook_thread_id", false);
byte[] data = Base64.decode(tindex, Base64.DEFAULT); if (outlook_thread_id) {
if (data.length >= 22) { byte[] data = Base64.decode(tindex, Base64.DEFAULT);
long msb = 0, lsb = 0; if (data.length >= 22) {
for (int i = 0 + 6; i < 8 + 6; i++) long msb = 0, lsb = 0;
msb = (msb << 8) | (data[i] & 0xff); for (int i = 0 + 6; i < 8 + 6; i++)
for (int i = 8 + 6; i < 16 + 6; i++) msb = (msb << 8) | (data[i] & 0xff);
lsb = (lsb << 8) | (data[i] & 0xff); for (int i = 8 + 6; i < 16 + 6; i++)
UUID guid = new UUID(msb, lsb); lsb = (lsb << 8) | (data[i] & 0xff);
Log.i("Outlook thread=" + guid); UUID guid = new UUID(msb, lsb);
return "outlook:" + guid; Log.i("Outlook thread=" + guid);
return "outlook:" + guid;
}
} }
} }
} catch (Throwable ex) {
Log.w(ex);
} }
} catch (Throwable ex) {
Log.w(ex);
}
String thread = null; String thread = null;
String msgid = getMessageID(); String msgid = getMessageID();

Loading…
Cancel
Save