- Map<Post, Set<Reply>> postReplies = new HashMap<Post, Set<Reply>>();
- for (Reply reply : allReplies) {
- Post post = reply.getPost();
- Set<Sone> sones = postSones.get(post);
+ Map<Post, Set<PostReply>> postReplies = new HashMap<Post, Set<PostReply>>();
+ for (PostReply reply : allReplies) {
+ /*
+ * All replies from a new-reply notification have posts,
+ * ListNotificationFilters takes care of that.
+ */
+ Optional<Post> post = reply.getPost();
+ Set<Sone> sones = postSones.get(post.get());