From: David ‘Bombe’ Roden Date: Tue, 7 Jun 2011 12:42:18 +0000 (+0200) Subject: Remove replies to unknown posts from status. X-Git-Tag: 0.6.5^2~12 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a7e3fb280672fe832711199f964df6e2b288278b;p=Sone.git Remove replies to unknown posts from status. --- diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java index 07fdfa8..246cbed 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -127,6 +127,14 @@ public class GetStatusAjaxPage extends JsonPage { }); } + /* remove replies to unknown posts. */ + newReplies = Filters.filteredSet(newReplies, new Filter() { + + @Override + public boolean filterObject(Reply reply) { + return reply.getPost() != null; + } + }); JsonArray jsonReplies = new JsonArray(); for (Reply reply : newReplies) { JsonObject jsonReply = new JsonObject();