Allow Sone, Post, and Reply creation only through the Core and its caches.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / CreatePostPage.java
index d44ee4f..58fd74e 100644 (file)
@@ -53,7 +53,7 @@ public class CreatePostPage extends SoneTemplatePage {
                String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim();
                if (text.length() != 0) {
                        Sone currentSone = getCurrentSone(request.getToadletContext());
-                       Post post = new Post(currentSone, System.currentTimeMillis(), text);
+                       Post post = webInterface.core().createPost(currentSone, System.currentTimeMillis(), text);
                        currentSone.addPost(post);
                        throw new RedirectException("index.html");
                }