X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreatePostPage.java;h=bed96a486472d334be1567b42c7c5e7d1e6cea14;hb=068db5a4bf905702943e9cdf20fc13cc8d85b36c;hp=44e0d219d1addd813da83eb65dbbb5068315875c;hpb=dcf921e95da3881c75f57323733273c96027822e;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 44e0d21..bed96a4 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java @@ -18,6 +18,7 @@ package net.pterodactylus.sone.web; import net.pterodactylus.sone.data.Post; +import net.pterodactylus.sone.data.Sone; import net.pterodactylus.util.template.Template; /** @@ -51,7 +52,8 @@ public class CreatePostPage extends SoneTemplatePage { super.processTemplate(request, template); String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim(); if (text.length() != 0) { - getCurrentSone(request.getToadletContext()).addPost(text); + Sone currentSone = getCurrentSone(request.getToadletContext()); + webInterface.core().createPost(currentSone, System.currentTimeMillis(), text); throw new RedirectException("index.html"); } template.set("errorTextEmpty", true);