Return local Sones from core and web interface.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / GetNotificationsAjaxPage.java
index d86e5a8..e6a6a9f 100644 (file)
@@ -25,7 +25,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
-import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.data.LocalSone;
 import net.pterodactylus.sone.main.SonePlugin;
 import net.pterodactylus.sone.notify.ListNotificationFilters;
 import net.pterodactylus.sone.web.WebInterface;
@@ -81,7 +81,7 @@ public class GetNotificationsAjaxPage extends JsonPage {
         */
        @Override
        protected JsonReturnObject createJsonObject(FreenetRequest request) {
-               Optional<Sone> currentSone = getCurrentSone(request.getToadletContext(), false);
+               Optional<LocalSone> currentSone = getCurrentSone(request.getToadletContext(), false);
                Collection<Notification> notifications = webInterface.getNotifications().getNotifications();
                List<Notification> filteredNotifications = ListNotificationFilters.filterNotifications(notifications, currentSone.orNull());
                Collections.sort(filteredNotifications, Notification.CREATED_TIME_SORTER);
@@ -145,7 +145,7 @@ public class GetNotificationsAjaxPage extends JsonPage {
         *            The current Sone (may be {@code null})
         * @return The current options
         */
-       private static JsonNode createJsonOptions(Optional<Sone> currentSone) {
+       private static JsonNode createJsonOptions(Optional<LocalSone> currentSone) {
                ObjectNode options = new ObjectNode(instance);
                if (currentSone.isPresent()) {
                        options.put("ShowNotification/NewSones", currentSone.get().getOptions().isShowNewSoneNotifications());