Add prefixes to all encoding methods, add method to encode a single Post.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / GetPostsCommand.java
index 16006fc..0a02a89 100644 (file)
@@ -55,9 +55,9 @@ public class GetPostsCommand extends AbstractSoneCommand {
                int maxPosts = getInt(parameters, "MaxPosts", -1);
                List<Post> posts = sone.getPosts();
                if (posts.size() < startPost) {
-                       return new Response(encodePosts(Collections.<Post> emptyList(), false));
+                       return new Response(encodePosts(Collections.<Post> emptyList(), "Posts.", false));
                }
-               return new Response(encodePosts(sone.getPosts().subList(startPost, (maxPosts == -1) ? posts.size() : Math.min(startPost + maxPosts, posts.size())), true));
+               return new Response(encodePosts(sone.getPosts().subList(startPost, (maxPosts == -1) ? posts.size() : Math.min(startPost + maxPosts, posts.size())), "Posts.", true));
        }
 
 }