Always add appropriate own identities when getting trusted identities.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 16 Sep 2011 14:28:58 +0000 (16:28 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 16 Sep 2011 14:28:58 +0000 (16:28 +0200)
src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java

index 17c440e..1c30752 100644 (file)
@@ -182,8 +182,10 @@ public class IdentityManager extends AbstractService {
         */
        public Set<Identity> getTrustedIdentities(OwnIdentity ownIdentity) {
                Set<Identity> identities = new HashSet<Identity>();
-               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<Identity> trustedIdentities = webOfTrustConnector.loadTrustedIdentities(ownIdentity, context);