X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostCommand.java;h=664202c4a4dddc8fc82e34dd9939138829f1f261;hb=7fb49938b9198110c34bcc600c545bfa91acf6f2;hp=c503f5b75b1eb4daaa9429f5ee5d86244875a648;hpb=6e9a43ccd93ae125720547c0fe421dc81a54ba90;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 c503f5b..664202c 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetPostCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetPostCommand.java @@ -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.")); } }