Only allow posts that have been downloaded.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Apr 2011 18:43:48 +0000 (20:43 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Apr 2011 18:43:48 +0000 (20:43 +0200)
src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java

index fe024d6..f2bff09 100644 (file)
@@ -90,7 +90,7 @@ public class ListNotificationFilters {
                }
                List<Post> newPosts = new ArrayList<Post>();
                for (Post post : newPostNotification.getElements()) {
-                       if (currentSone.hasFriend(post.getSone().getId()) || currentSone.equals(post.getSone()) || currentSone.equals(post.getRecipient())) {
+                       if ((post.getSone() != null) && (currentSone.hasFriend(post.getSone().getId()) || currentSone.equals(post.getSone()) || currentSone.equals(post.getRecipient()))) {
                                newPosts.add(post);
                        }
                }