Refactoring

This commit is contained in:
M66B
2019-05-12 18:22:41 +02:00
parent 121c89abbd
commit 09ace5e05a
5 changed files with 22 additions and 21 deletions

View File

@@ -731,6 +731,16 @@ public class MessageHelper {
return TextUtils.join(", ", formatted);
}
static String canonicalAddress(String address) {
String[] a = address.split("@");
if (a.length > 0) {
String[] extra = a[0].split("\\+");
if (extra.length > 0)
a[0] = extra[0];
}
return TextUtils.join("@", a).toLowerCase();
}
static String decodeMime(String text) {
if (text == null)
return null;