From: David ‘Bombe’ Roden Date: Fri, 5 Dec 2014 06:00:26 +0000 (+0100) Subject: Use local Sones for adding friends. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=858555f647a1c39b2a6707192bdb8f32107aa5dd;p=Sone.git Use local Sones for adding friends. --- diff --git a/src/main/java/net/pterodactylus/sone/database/FriendProvider.java b/src/main/java/net/pterodactylus/sone/database/FriendProvider.java index 3665d1b..7583c77 100644 --- a/src/main/java/net/pterodactylus/sone/database/FriendProvider.java +++ b/src/main/java/net/pterodactylus/sone/database/FriendProvider.java @@ -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 getFriends(Sone localSone); - boolean isFriend(Sone localSone, String friendSoneId); + Collection getFriends(LocalSone localSone); + boolean isFriend(LocalSone localSone, String friendSoneId); } diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java index 7a548b9..bfea5e2 100644 --- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java +++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryDatabase.java @@ -624,7 +624,7 @@ public class MemoryDatabase extends AbstractService implements Database { } @Override - public Collection getFriends(Sone localSone) { + public Collection 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; }