Distinguish between local and “normal” Sones in FCP handler.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / GetPostFeedCommand.java
index b22d356..dbaf189 100644 (file)
@@ -24,6 +24,7 @@ import java.util.HashSet;
 import java.util.List;
 
 import net.pterodactylus.sone.core.Core;
+import net.pterodactylus.sone.data.LocalSone;
 import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.freenet.fcp.FcpException;
@@ -57,7 +58,7 @@ public class GetPostFeedCommand extends AbstractSoneCommand {
         */
        @Override
        public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
-               Sone sone = getSone(parameters, "Sone", true);
+               LocalSone sone = getLocalSone(parameters, "Sone", true).get();
                int startPost = getInt(parameters, "StartPost", 0);
                int maxPosts = getInt(parameters, "MaxPosts", -1);