X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreatePostPage.java;h=bed96a486472d334be1567b42c7c5e7d1e6cea14;hb=5069a213ae0d5891e598e93269b2cee20511b89b;hp=58fd74ed258c38b944bafffa2485e0b0f3bd5255;hpb=94041feaf2a141b8c75725301f06d7e4bc617a12;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java b/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java index 58fd74e..bed96a4 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java @@ -53,8 +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 = webInterface.core().createPost(currentSone, System.currentTimeMillis(), text); - currentSone.addPost(post); + webInterface.core().createPost(currentSone, System.currentTimeMillis(), text); throw new RedirectException("index.html"); } template.set("errorTextEmpty", true);