Borrow reply name from sender name

This commit is contained in:
M66B 2019-09-26 14:03:35 +02:00
parent a1f1ede337
commit 3020eb2ba9
1 changed files with 10 additions and 0 deletions

View File

@ -1907,6 +1907,16 @@ class Core {
message.ui_ignored = seen; message.ui_ignored = seen;
message.ui_browsed = browsed; message.ui_browsed = browsed;
// Borrow reply name from sender name
if (message.from != null && message.from.length == 1 &&
message.reply != null && message.reply.length == 1) {
InternetAddress reply = (InternetAddress) message.reply[0];
if (TextUtils.isEmpty(reply.getPersonal())) {
InternetAddress from = (InternetAddress) message.from[0];
reply.setPersonal(from.getPersonal());
}
}
EntityIdentity identity = matchIdentity(context, folder, message); EntityIdentity identity = matchIdentity(context, folder, message);
message.identity = (identity == null ? null : identity.id); message.identity = (identity == null ? null : identity.id);