Search identity on lower case email address

pull/146/head
M66B 7 years ago
parent 663dfd0ea0
commit d988f43e0b

@ -401,8 +401,11 @@ public class FragmentIdentity extends FragmentEx {
if (TextUtils.isEmpty(password) && !insecure) if (TextUtils.isEmpty(password) && !insecure)
throw new IllegalArgumentException(getContext().getString(R.string.title_no_password)); throw new IllegalArgumentException(getContext().getString(R.string.title_no_password));
email = email.toLowerCase();
if (TextUtils.isEmpty(replyto)) if (TextUtils.isEmpty(replyto))
replyto = null; replyto = null;
else
replyto = replyto.toLowerCase();
if (Color.TRANSPARENT == color) if (Color.TRANSPARENT == color)
color = null; color = null;

@ -1874,10 +1874,13 @@ public class ServiceSynchronize extends LifecycleService {
EntityIdentity identity = null; EntityIdentity identity = null;
if (tos != null && tos.length > 0) { if (tos != null && tos.length > 0) {
String to = ((InternetAddress) tos[0]).getAddress(); String to = ((InternetAddress) tos[0]).getAddress();
if (!TextUtils.isEmpty(to)) {
to = to.toLowerCase();
identity = db.identity().getIdentity(folder.account, to); identity = db.identity().getIdentity(folder.account, to);
if (identity == null) if (identity == null)
identity = db.identity().getIdentity(folder.account, Helper.canonicalAddress(to)); identity = db.identity().getIdentity(folder.account, Helper.canonicalAddress(to));
} }
}
message = new EntityMessage(); message = new EntityMessage();
message.account = folder.account; message.account = folder.account;

Loading…
Cancel
Save