mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 03:19:24 +01:00
Search identity on canonical address too
This commit is contained in:
@@ -1870,10 +1870,14 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
}
|
||||
|
||||
if (message == null) {
|
||||
Address[] to = helper.getTo();
|
||||
Address[] tos = helper.getTo();
|
||||
EntityIdentity identity = null;
|
||||
if (to != null && to.length > 0)
|
||||
identity = db.identity().getIdentity(folder.account, ((InternetAddress) to[0]).getAddress());
|
||||
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));
|
||||
}
|
||||
|
||||
message = new EntityMessage();
|
||||
message.account = folder.account;
|
||||
|
||||
Reference in New Issue
Block a user