From 4bbe0684ed8a346849a1adb0a551b191a1a6e1e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 16 Sep 2011 16:28:58 +0200 Subject: [PATCH] Always add appropriate own identities when getting trusted identities. --- .../java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.7.4