X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetReplyAjaxPage.java;h=d0b79ac119679f20bce071d9803986dce0c37162;hp=251c78432bf2f99628b86f33cde1ea03bc829c53;hb=53a71d1d6b91e4d56af49a06f2e06bc4d11bf3eb;hpb=1a2c9eb50e89d9ba5f9ea9b72721ebfeb68650cd diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.java index 251c784..d0b79ac 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.java @@ -97,7 +97,7 @@ public class GetReplyAjaxPage extends JsonPage { * The currently logged in Sone (to store in the template) * @return The JSON representation of the reply */ - private JsonNode createJsonReply(FreenetRequest request, PostReply reply, Sone currentSone) { + private JsonNode createJsonReply(FreenetRequest request, PostReply reply, Optional currentSone) { ObjectNode jsonReply = new ObjectNode(instance); jsonReply.put("id", reply.getId()); jsonReply.put("postId", reply.getPostId()); @@ -108,7 +108,7 @@ public class GetReplyAjaxPage extends JsonPage { templateContext.set("core", webInterface.getCore()); templateContext.set("request", request); templateContext.set("reply", reply); - templateContext.set("currentSone", currentSone); + templateContext.set("currentSone", currentSone.orNull()); try { replyTemplate.render(templateContext, stringWriter); } catch (TemplateException te1) {