Store locality of a Sone in the Sone itself.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / DeletePostAjaxPage.java
index ea2310c..b822e52 100644 (file)
@@ -53,7 +53,7 @@ public class DeletePostAjaxPage extends JsonPage {
                if ((post == null) || (post.getSone() == null)) {
                        return createErrorJsonObject("invalid-post-id");
                }
-               if (!webInterface.getCore().isLocalSone(post.getSone())) {
+               if (!post.getSone().isLocal()) {
                        return createErrorJsonObject("not-authorized");
                }
                webInterface.getCore().deletePost(post);