X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetNotificationsAjaxPage.java;h=59c6b2f7ee2543f761cc2164f82c92c3916bd793;hb=128580ddb154ce7d4f12108a8a70a8fe12488ffe;hp=65d3943989d3a956b4eba9a3a17a877503ade5e8;hpb=f9b5addb5d0e7a080e9f314cf6712143f5e26060;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java index 65d3943..59c6b2f 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java @@ -79,7 +79,7 @@ public class GetNotificationsAjaxPage extends JsonPage { */ @Override protected JsonReturnObject createJsonObject(FreenetRequest request) { - Sone currentSone = getCurrentSone(request.getToadletContext(), false); + Sone currentSone = getCurrentSoneWithoutCreatingSession(request.getToadletContext()); List notifications = new ArrayList(webInterface.getNotifications(currentSone)); Collections.sort(notifications, Notification.CREATED_TIME_SORTER); ArrayNode jsonNotifications = new ArrayNode(instance); @@ -110,7 +110,7 @@ public class GetNotificationsAjaxPage extends JsonPage { if (notification instanceof TemplateNotification) { TemplateContext templateContext = webInterface.getTemplateContextFactory().createTemplateContext().mergeContext(((TemplateNotification) notification).getTemplateContext()); templateContext.set("core", webInterface.getCore()); - templateContext.set("currentSone", webInterface.getCurrentSone(request.getToadletContext(), false)); + templateContext.set("currentSone", webInterface.getCurrentSoneWithoutCreatingSession(request.getToadletContext())); templateContext.set("localSones", webInterface.getCore().getLocalSones()); templateContext.set("request", request); templateContext.set("currentVersion", SonePlugin.getPluginVersion());