projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add “localOnly” parameter to getSone().
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
fcp
/
GetPostFeedCommand.java
diff --git
a/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
b/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
index
895c1c6
..
d4b175c
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
+++ b/
src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java
@@
-54,7
+54,7
@@
public class GetPostFeedCommand extends AbstractSoneCommand {
*/
@Override
public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
*/
@Override
public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
- Sone sone = getSone(parameters, "Sone");
+ Sone sone = getSone(parameters, "Sone"
, true
);
int startPost = getInt(parameters, "StartPost", 0);
int maxPosts = getInt(parameters, "MaxPosts", -1);
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) {
Collections.sort(sortedPosts, Post.TIME_COMPARATOR);
if (sortedPosts.size() < startPost) {
- return new Response(encodePosts(Collections.<Post> emptyList(), "Posts.", false));
+ return new Response(
"PostFeed",
encodePosts(Collections.<Post> emptyList(), "Posts.", false));
}
}
- return new Response(encodePosts(sortedPosts.subList(startPost, (maxPosts == -1) ? sortedPosts.size() : Math.min(startPost + maxPosts, sortedPosts.size())), "Posts.", true));
+ return new Response(
"PostFeed",
encodePosts(sortedPosts.subList(startPost, (maxPosts == -1) ? sortedPosts.size() : Math.min(startPost + maxPosts, sortedPosts.size())), "Posts.", true));
}
}
}
}