Search identity on lower case email address

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

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

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

Loading…
Cancel
Save