Use local Sones for adding friends.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Dec 2014 06:00:26 +0000 (07:00 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Dec 2014 06:00:26 +0000 (07:00 +0100)
src/main/java/net/pterodactylus/sone/database/FriendProvider.java
src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java

index 3665d1b..7583c77 100644 (file)
@@ -2,6 +2,7 @@ package net.pterodactylus.sone.database;
 
 import java.util.Collection;
 
+import net.pterodactylus.sone.data.LocalSone;
 import net.pterodactylus.sone.data.Sone;
 
 /**
@@ -11,7 +12,7 @@ import net.pterodactylus.sone.data.Sone;
  */
 public interface FriendProvider {
 
-       Collection<String> getFriends(Sone localSone);
-       boolean isFriend(Sone localSone, String friendSoneId);
+       Collection<String> getFriends(LocalSone localSone);
+       boolean isFriend(LocalSone localSone, String friendSoneId);
 
 }
index 7a548b9..bfea5e2 100644 (file)
@@ -624,7 +624,7 @@ public class MemoryDatabase extends AbstractService implements Database {
        }
 
        @Override
-       public Collection<String> getFriends(Sone localSone) {
+       public Collection<String> getFriends(LocalSone localSone) {
                if (!localSone.isLocal()) {
                        return Collections.emptySet();
                }
@@ -632,7 +632,7 @@ public class MemoryDatabase extends AbstractService implements Database {
        }
 
        @Override
-       public boolean isFriend(Sone localSone, String friendSoneId) {
+       public boolean isFriend(LocalSone localSone, String friendSoneId) {
                if (!localSone.isLocal()) {
                        return false;
                }