Fix likes only containing the likes of local Sones.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 28 Oct 2010 09:18:54 +0000 (11:18 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 28 Oct 2010 09:25:52 +0000 (11:25 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 00aefe2..accfa1e 100644 (file)
@@ -643,8 +643,8 @@ public class Core extends AbstractService {
         *            The post to check for
         * @return All Sones that like the post
         */
-       public Set<Sone> getLikes(final Post post) {
-               return Filters.filteredSet(getSones(), new Filter<Sone>() {
+       public Collection<Sone> getLikes(final Post post) {
+               return Filters.filteredCollection(getKnownSones(), new Filter<Sone>() {
 
                        @Override
                        public boolean filterObject(Sone sone) {
@@ -660,8 +660,8 @@ public class Core extends AbstractService {
         *            The reply to check for
         * @return All Sones that like the reply
         */
-       public Set<Sone> getLikes(final Reply reply) {
-               return Filters.filteredSet(getSones(), new Filter<Sone>() {
+       public Collection<Sone> getLikes(final Reply reply) {
+               return Filters.filteredCollection(getKnownSones(), new Filter<Sone>() {
 
                        @Override
                        public boolean filterObject(Sone sone) {