🚧 Filter new replies using the current Sone
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / NewElements.kt
index c45d15e..4dd78cb 100644 (file)
@@ -44,9 +44,9 @@ class NewElements @Inject constructor(
                        .flatMap(ListNotification<Post>::elements)
                        .filter { postVisibilityFilter.isPostVisible(currentSone, it) }
 
-       fun newReplies(): Collection<PostReply> =
+       fun newReplies(currentSone: Sone? = null): Collection<PostReply> =
                listOf(newReplyNotification, localReplyNotification)
                        .flatMap(ListNotification<PostReply>::elements)
-                       .filter { replyVisibilityFilter.isReplyVisible(null, it) }
+                       .filter { replyVisibilityFilter.isReplyVisible(currentSone, it) }
 
 }