From: David ‘Bombe’ Roden Date: Thu, 15 Sep 2011 15:47:26 +0000 (+0200) Subject: Add own identities to list of trusted identities. X-Git-Tag: 0.0.1~5 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5b4d802d199206dac860f4691583f75ffe820ade;p=WoTNS.git Add own identities to list of 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 eefb372..1411ab3 100644 --- a/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/wotns/freenet/wot/IdentityManager.java @@ -217,6 +217,17 @@ public class IdentityManager extends AbstractService { for (Identity identity : trustedIdentities) { identities.put(identity.getId(), identity); } + + /* add own identities, too, as long as the WoT doesn’t do that. */ + for (OwnIdentity additionalOwnIdentity : ownIdentities) { + if (additionalOwnIdentity == ownIdentity) { + continue; + } + if ((context != null) && !additionalOwnIdentity.hasContext(context)) { + continue; + } + identities.put(additionalOwnIdentity.getId(), additionalOwnIdentity); + } } identitiesLoaded = true; } catch (WebOfTrustException wote1) {