}
List<Post> newPosts = new ArrayList<Post>();
for (Post post : newPostNotification.getElements()) {
- if ((post.getSone() != null) && (currentSone.hasFriend(post.getSone().getId()) || currentSone.equals(post.getSone()) || currentSone.equals(post.getRecipient()))) {
+ if (isPostVisible(currentSone, post)) {
newPosts.add(post);
}
}
}
List<Reply> newReplies = new ArrayList<Reply>();
for (Reply reply : newReplyNotification.getElements()) {
- if (((reply.getPost().getSone() != null) && currentSone.hasFriend(reply.getPost().getSone().getId())) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient())) {
+ if (isPostVisible(currentSone, reply.getPost())) {
newReplies.add(reply);
}
}
* Sone.</li>
* <li>The given Sone has not explicitely assigned negative trust to the
* post’s Sone but the implicit trust is negative.</li>
+ * <li>The post’s {@link Post#getTime() time} is in the future.</li>
* </ul>
* If none of these statements is true the post is considered visible.
*