Store the insert URI in the information used for inserting.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / GetPostCommand.java
index e15d7d6..664202c 100644 (file)
@@ -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."));
        }
 
 }