X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostFeedCommand.java;h=f1ff9a86c6d54e7bbe8faac2aaf63fa4e438b1d3;hb=86de0f4478465475dd403ae9daa90aabe0ca3e9c;hp=2dc59a1b3ab9247d371c9db8b552689befc2a51d;hpb=a50303a787867cdc2449da8846e1e365b771e109;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java index 2dc59a1..f1ff9a8 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java @@ -53,7 +53,7 @@ public class GetPostFeedCommand extends AbstractSoneCommand { * {@inheritDoc} */ @Override - public Reply execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { + public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { Sone sone = getSone(parameters, "Sone"); int startPost = getInt(parameters, "StartPost", 0); int maxPosts = getInt(parameters, "MaxPosts", -1); @@ -73,10 +73,10 @@ public class GetPostFeedCommand extends AbstractSoneCommand { Collections.sort(sortedPosts, Post.TIME_COMPARATOR); if (sortedPosts.size() < startPost) { - return new Reply(encodePosts(Collections. emptyList())); + return new Response(encodePosts(Collections. emptyList(), false)); } - return new Reply(encodePosts(sortedPosts.subList(startPost, (maxPosts == -1) ? sortedPosts.size() : Math.min(startPost + maxPosts, sortedPosts.size())))); + return new Response(encodePosts(sortedPosts.subList(startPost, (maxPosts == -1) ? sortedPosts.size() : Math.min(startPost + maxPosts, sortedPosts.size())), true)); } }