From 5b4d802d199206dac860f4691583f75ffe820ade Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 15 Sep 2011 17:47:26 +0200 Subject: [PATCH] Add own identities to list of trusted identities. --- .../net/pterodactylus/wotns/freenet/wot/IdentityManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) { -- 2.7.4