From: David ‘Bombe’ Roden Date: Wed, 27 Apr 2011 18:43:48 +0000 (+0200) Subject: Only allow posts that have been downloaded. X-Git-Tag: 0.6.3^2~8 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b1c2516dedba75c15e4b62d9c1630f1c85fa085c;p=Sone.git Only allow posts that have been downloaded. --- diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java index fe024d6..f2bff09 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java @@ -90,7 +90,7 @@ public class ListNotificationFilters { } List newPosts = new ArrayList(); 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); } }