mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-27 08:23:24 +00:00
Workaround invalid references separator
This commit is contained in:
parent
ee62bce462
commit
0e571fd36e
1 changed files with 6 additions and 2 deletions
|
@ -772,7 +772,7 @@ public class MessageHelper {
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
String refs = imessage.getHeader("References", null);
|
String refs = imessage.getHeader("References", null);
|
||||||
if (refs != null)
|
if (refs != null)
|
||||||
result.addAll(Arrays.asList(MimeUtility.unfold(refs).split("\\s+")));
|
result.addAll(Arrays.asList(getReferences(refs)));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Merge references of original message for threading
|
// Merge references of original message for threading
|
||||||
|
@ -802,7 +802,7 @@ public class MessageHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arefs != null)
|
if (arefs != null)
|
||||||
for (String ref : MimeUtility.unfold(arefs).split("\\s+"))
|
for (String ref : getReferences(arefs))
|
||||||
if (!result.contains(ref)) {
|
if (!result.contains(ref)) {
|
||||||
Log.i("rfc822 ref=" + ref);
|
Log.i("rfc822 ref=" + ref);
|
||||||
result.add(ref);
|
result.add(ref);
|
||||||
|
@ -824,6 +824,10 @@ public class MessageHelper {
|
||||||
return result.toArray(new String[0]);
|
return result.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String[] getReferences(String header) {
|
||||||
|
return MimeUtility.unfold(header).split("[,\\s+]");
|
||||||
|
}
|
||||||
|
|
||||||
String getDeliveredTo() throws MessagingException {
|
String getDeliveredTo() throws MessagingException {
|
||||||
String header = imessage.getHeader("Delivered-To", null);
|
String header = imessage.getHeader("Delivered-To", null);
|
||||||
if (header == null)
|
if (header == null)
|
||||||
|
|
Loading…
Reference in a new issue