Store locality of a Sone in the Sone itself.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / DeleteReplyCommand.java
index daed26d..33374d9 100644 (file)
@@ -48,7 +48,7 @@ public class DeleteReplyCommand extends AbstractSoneCommand {
        @Override
        public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
                PostReply reply = getReply(parameters, "Reply");
-               if (!getCore().isLocalSone(reply.getSone())) {
+               if (!reply.getSone().isLocal()) {
                        return new ErrorResponse(401, "Not allowed.");
                }
                return new Response("ReplyDeleted", new SimpleFieldSetBuilder().get());