Improved local contact handling

This commit is contained in:
M66B
2019-09-26 12:51:39 +02:00
parent e6e0a00767
commit 79da181f36
3 changed files with 75 additions and 67 deletions

View File

@@ -163,14 +163,11 @@ public class EntityMessage implements Serializable {
}
boolean replySelf(List<TupleIdentityEx> identities) {
if (identities != null) {
Address[] senders = (reply == null || reply.length == 0 ? from : reply);
if (senders != null)
for (Address sender : senders)
for (TupleIdentityEx identity : identities)
if (identity.similarAddress(sender))
return true;
}
if (identities != null && from != null)
for (Address sender : from)
for (TupleIdentityEx identity : identities)
if (identity.similarAddress(sender))
return true;
return false;
}