Use the core to check for the locality of a Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 18 Jan 2011 07:39:41 +0000 (08:39 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 18 Jan 2011 07:42:46 +0000 (08:42 +0100)
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java

index 52424e6..119a28e 100644 (file)
@@ -74,7 +74,7 @@ public class SoneAccessor extends ReflectionAccessor {
                if (member.equals("niceName")) {
                        return getNiceName(sone);
                } else if (member.equals("local")) {
-                       return sone.getInsertUri() != null;
+                       return core.isLocalSone(sone);
                } else if (member.equals("friend")) {
                        Sone currentSone = (Sone) dataProvider.get("currentSone");
                        return (currentSone != null) && currentSone.hasFriend(sone.getId());