X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostCommand.java;h=664202c4a4dddc8fc82e34dd9939138829f1f261;hb=f10d40f746f6c7c716f783da11791d28c1117447;hp=bb874073ab0fbf72c16b740e37d6e9544bcaa044;hpb=47ed7eaf00c35889781831d33d04e9f91c9ad266;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 bb87407..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 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.")); } }