Return an optional Sone from the current session.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / NewPage.java
index 5977349..a79eefa 100644 (file)
@@ -74,7 +74,7 @@ public class NewPage extends SoneTemplatePage {
                }
 
                /* filter and sort them. */
-               List<Post> sortedPosts = ListNotificationFilters.filterPosts(new ArrayList<Post>(posts), webInterface.getCurrentSone(request.getToadletContext(), false));
+               List<Post> sortedPosts = ListNotificationFilters.filterPosts(new ArrayList<Post>(posts), webInterface.getCurrentSone(request.getToadletContext(), false).orNull());
                Collections.sort(sortedPosts, Post.TIME_COMPARATOR);
 
                /* paginate them. */