Hardcode document name for Sone SSKs to “Sone”.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 8bf2cea..56e60d4 100644 (file)
@@ -322,7 +322,7 @@ public class Core extends AbstractService {
         *             if a Sone error occurs
         */
        public Sone createSone(String name) throws SoneException {
-               return createSone(name, "Sone-" + name, null, null);
+               return createSone(name, "Sone", null, null);
        }
 
        /**
@@ -540,6 +540,23 @@ public class Core extends AbstractService {
        }
 
        /**
+        * Gets all Sones that like the given reply.
+        *
+        * @param reply
+        *            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>() {
+
+                       @Override
+                       public boolean filterObject(Sone sone) {
+                               return sone.isLikedReplyId(reply.getId());
+                       }
+               });
+       }
+
+       /**
         * Deletes the given reply. It is removed from its Sone and from the reply
         * cache.
         *