X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostCommand.java;h=664202c4a4dddc8fc82e34dd9939138829f1f261;hb=6abff3e875d253a011c73574f2a6012a28af279a;hp=e15d7d671b8e3b50b434461b4021dae3ee88a788;hpb=a47643aed43d118ca68044f95451bb5374cdb332;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetPostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetPostCommand.java index e15d7d6..664202c 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetPostCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetPostCommand.java @@ -1,5 +1,5 @@ /* - * Sone - GetPostCommand.java - Copyright © 2011–2012 David Roden + * Sone - GetPostCommand.java - Copyright © 2011–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,15 +40,12 @@ public class GetPostCommand extends AbstractSoneCommand { super(core); } - /** - * {@inheritDoc} - */ @Override public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { Post post = getPost(parameters, "Post"); boolean includeReplies = getBoolean(parameters, "IncludeReplies", true); - return new Response("Post", encodePost(post, "Post.", includeReplies)); + return new Response("Post", includeReplies ? encodePostWithReplies(post, "Post.") : encodePost(post, "Post.")); } }