Add all posts that have the current Sone as recipient.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / IndexPage.java
index 2d61cf3..a33072f 100644 (file)
@@ -63,6 +63,13 @@ public class IndexPage extends SoneTemplatePage {
                        }
                        allPosts.addAll(webInterface.getCore().getSone(friendSoneId).getPosts());
                }
+               for (Sone sone : webInterface.getCore().getSones()) {
+                       for (Post post : sone.getPosts()) {
+                               if (currentSone.equals(post.getRecipient()) && !allPosts.contains(post)) {
+                                       allPosts.add(post);
+                               }
+                       }
+               }
                Collections.sort(allPosts, Post.TIME_COMPARATOR);
                template.set("posts", allPosts);
        }