projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increase version to 0.8.1.
[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
..
4c07359
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);
@@
-64,7
+64,7
@@
public class GetPostFeedCommand extends AbstractSoneCommand {
if (!getCore().hasSone(friendSoneId)) {
continue;
}
if (!getCore().hasSone(friendSoneId)) {
continue;
}
- allPosts.addAll(getCore().getSone(friendSoneId).getPosts());
+ allPosts.addAll(getCore().getSone(friendSoneId
, false
).getPosts());
}
allPosts.addAll(getCore().getDirectedPosts(sone));
allPosts = Filters.filteredSet(allPosts, Post.FUTURE_POSTS_FILTER);
}
allPosts.addAll(getCore().getDirectedPosts(sone));
allPosts = Filters.filteredSet(allPosts, Post.FUTURE_POSTS_FILTER);
@@
-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));
}
}
}
}