From: David ‘Bombe’ Roden Date: Fri, 16 Sep 2011 14:28:58 +0000 (+0200) Subject: Always add appropriate own identities when getting trusted identities. X-Git-Tag: 0.0.5^2~1 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=4bbe0684ed8a346849a1adb0a551b191a1a6e1e8;p=WoTNS.git Always add appropriate own identities when getting trusted identities. --- diff --git a/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java b/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java index 17c440e..1c30752 100644 --- a/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java @@ -182,8 +182,10 @@ public class IdentityManager extends AbstractService { */ public Set getTrustedIdentities(OwnIdentity ownIdentity) { Set identities = new HashSet(); - if ((context == null) || ownIdentity.getContexts().contains(context)) { - identities.add(ownIdentity); + for (OwnIdentity additionalOwnIdentity : getAllOwnIdentities()) { + if ((context == null) || additionalOwnIdentity.getContexts().contains(context)) { + identities.add(additionalOwnIdentity); + } } try { Set trustedIdentities = webOfTrustConnector.loadTrustedIdentities(ownIdentity, context);