X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreatePostPage.java;h=bed96a486472d334be1567b42c7c5e7d1e6cea14;hb=e2cae8504eea6b4c833e9aa87ccd70d897e5f0f2;hp=58fd74ed258c38b944bafffa2485e0b0f3bd5255;hpb=62361f7814c1ad34bfa182c8f84b4f484b13241b;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);