Use correct notification ID.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / GetNotificationAjaxPage.java
index bd1457f..0472349 100644 (file)
@@ -78,12 +78,12 @@ public class GetNotificationAjaxPage extends JsonPage {
        protected JsonObject createJsonObject(Request request) {
                String[] notificationIds = request.getHttpRequest().getParam("notifications").split(",");
                JsonObject jsonNotifications = new JsonObject();
-               Sone currentSone = webInterface.getCurrentSone(request.getToadletContext(), false);
+               Sone currentSone = getCurrentSone(request.getToadletContext(), false);
                for (String notificationId : notificationIds) {
                        Notification notification = webInterface.getNotifications().getNotification(notificationId);
                        if ("new-post-notification".equals(notificationId)) {
                                notification = ListNotificationFilters.filterNewPostNotification((ListNotification<Post>) notification, currentSone);
-                       } else if ("new-reply-notification".equals(notificationId)) {
+                       } else if ("new-replies-notification".equals(notificationId)) {
                                notification = ListNotificationFilters.filterNewReplyNotification((ListNotification<Reply>) notification, currentSone);
                        }
                        if (notification == null) {