X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetStatusAjaxPage.java;h=b28b82e97b0caedbb75b96b2069e3ab869991834;hp=9531a6d51decee030650406be98dcf4c2e64f399;hb=00271cc31bb7f28d4917a54d384aff58983f0a07;hpb=a7bd72e4db218681c02e7115f743e91b31af28e9 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 9531a6d..b28b82e 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -93,7 +93,7 @@ public class GetStatusAjaxPage extends JsonPage { @Override public boolean filterObject(Post post) { - return currentSone.hasFriend(post.getSone().getId()) || currentSone.equals(post.getSone()) || currentSone.equals(post.getRecipient()); + return ListNotificationFilters.isPostVisible(currentSone, post); } }); @@ -114,7 +114,7 @@ public class GetStatusAjaxPage extends JsonPage { @Override public boolean filterObject(Reply reply) { - return (reply.getPost() != null) && (reply.getPost().getSone() != null) && (currentSone.hasFriend(reply.getPost().getSone().getId()) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient())); + return ListNotificationFilters.isReplyVisible(currentSone, reply); } });