Get “includeReplies” parameter from simple field set.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 15:18:28 +0000 (17:18 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 15:18:28 +0000 (17:18 +0200)
src/main/java/net/pterodactylus/sone/fcp/GetPostCommand.java

index 3955db9..391694f 100644 (file)
@@ -46,7 +46,9 @@ public class GetPostCommand extends AbstractSoneCommand {
        @Override
        public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
                Post post = getPost(parameters, "Post");
-               return new Response(encodePost(post, "Post.", true));
+               boolean includeReplies = getBoolean(parameters, "IncludeReplies", true);
+
+               return new Response(encodePost(post, "Post.", includeReplies));
        }
 
 }