✨ Return filtered elements for get-status request
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / ajax / GetStatusAjaxPage.kt
index 0c77c38..c0a2c4e 100644 (file)
@@ -44,8 +44,8 @@ class GetStatusAjaxPage(webInterface: WebInterface, private val elementLoader: E
                                        this["options"] = currentSone?.options?.toJsonOptions() ?: jsonObject {}
                                        this["notificationHash"] = webInterface.getNotifications(currentSone).sortedBy { it.createdTime }.hashCode()
                                        this["sones"] = request.httpRequest.getParam("soneIds").split(',').mapNotNull(core::getSone).plus(currentSone).filterNotNull().toJsonSones()
-                                       this["newPosts"] = newElements.newPosts().toJsonPosts()
-                                       this["newReplies"] = newElements.newReplies().toJsonReplies()
+                                       this["newPosts"] = newElements.newPosts(currentSone).toJsonPosts()
+                                       this["newReplies"] = newElements.newReplies(currentSone).toJsonReplies()
                                        this["linkedElements"] = request.httpRequest.getParam("elements", "[]").asJson().map(JsonNode::asText).map(elementLoader::loadElement).toJsonElements()
                                }
                        }