* 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<Sone> currentSone) {
ObjectNode jsonReply = new ObjectNode(instance);
jsonReply.put("id", reply.getId());
jsonReply.put("postId", reply.getPostId());
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) {