Skip personal name equal to email address

This commit is contained in:
M66B 2021-03-06 18:19:30 +01:00
parent a107e4e62d
commit 0652c4d810
1 changed files with 8 additions and 0 deletions

View File

@ -1236,6 +1236,14 @@ public class MessageHelper {
if (TextUtils.isEmpty(email) && TextUtils.isEmpty(personal)) if (TextUtils.isEmpty(email) && TextUtils.isEmpty(personal))
continue; continue;
if (personal != null && personal.equals(email))
try {
iaddress.setPersonal(null);
personal = null;
} catch (UnsupportedEncodingException ex) {
Log.w(ex);
}
email = decodeMime(email); email = decodeMime(email);
if (!Helper.isSingleScript(email)) if (!Helper.isSingleScript(email))
email = punyCode(email); email = punyCode(email);