Get the trust directly from the identity.
[Sone.git] / src / main / java / net / pterodactylus / sone / template / SoneAccessor.java
index c134fc0..eca8654 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - SoneAccessor.java - Copyright © 2010 David Roden
+ * Sone - SoneAccessor.java - Copyright © 2010–2012 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ import net.pterodactylus.sone.core.Core;
 import net.pterodactylus.sone.data.Profile;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.data.Sone.SoneStatus;
+import net.pterodactylus.sone.freenet.wot.OwnIdentity;
 import net.pterodactylus.sone.freenet.wot.Trust;
 import net.pterodactylus.sone.web.WebInterface;
 import net.pterodactylus.sone.web.ajax.GetTimesAjaxPage;
@@ -106,8 +107,8 @@ public class SoneAccessor extends ReflectionAccessor {
                        if (currentSone == null) {
                                return null;
                        }
-                       Trust trust = core.getTrust(currentSone, sone);
-                       logger.log(Level.FINEST, "Trust for %s by %s: %s", new Object[] { sone, currentSone, trust });
+                       Trust trust = sone.getIdentity().getTrust((OwnIdentity) currentSone.getIdentity());
+                       logger.log(Level.FINEST, String.format("Trust for %s by %s: %s", sone, currentSone, trust));
                        if (trust == null) {
                                return new Trust(null, null, null);
                        }