X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostFeedCommand.java;h=fb44e3a5d8f88f721014ec21a898fca9aaa15e5d;hb=532076508aac8e03e0ef9914e90c7a0558b66bbe;hp=b22d356694f6b4d9b0ea087712ab7d4fc0c26b03;hpb=45803a1c678d6811f7bbf85d50c79844031be0f0;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 b22d356..fb44e3a 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetPostFeedCommand.java @@ -28,12 +28,12 @@ import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.freenet.fcp.FcpException; -import com.google.common.base.Optional; -import com.google.common.collect.Collections2; - import freenet.support.SimpleFieldSet; import freenet.support.api.Bucket; +import com.google.common.base.Optional; +import com.google.common.collect.Collections2; + /** * Implementation of an FCP interface for other clients or plugins to * communicate with Sone. @@ -52,9 +52,6 @@ public class GetPostFeedCommand extends AbstractSoneCommand { super(core); } - /** - * {@inheritDoc} - */ @Override public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { Sone sone = getSone(parameters, "Sone", true); @@ -70,7 +67,7 @@ public class GetPostFeedCommand extends AbstractSoneCommand { } allPosts.addAll(friendSone.get().getPosts()); } - allPosts.addAll(getCore().getDirectedPosts(sone.getId())); + allPosts.addAll(getCore().getDatabase().getDirectedPosts(sone.getId())); allPosts = Collections2.filter(allPosts, Post.FUTURE_POSTS_FILTER); List sortedPosts = new ArrayList(allPosts);