X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostFeedCommand.java;h=38b240abf9a406197ac7d2614dd6730932755807;hp=2dc59a1b3ab9247d371c9db8b552689befc2a51d;hb=6a426e5c3a82f3e63a8763d2a5ad57f311bc6065;hpb=9974554893d242667d5a7aace777ce07f7c07f95 diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java index 2dc59a1..38b240a 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())); } - 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())))); } }