X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FMarkAsKnownPage.kt;h=31e70fc4b39e12fae0519bc97371b7c192a9d164;hp=570e5707fd9039263de92344e4d9b8da59e9fb21;hb=fafe0029dcbef27ce918fdf7007e78c8705ca20f;hpb=ffd92ca2374c0b2218e583d02e0bdd24b8c110ae diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt index 570e570..31e70fc 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt @@ -18,9 +18,9 @@ class MarkAsKnownPage(template: Template, webInterface: WebInterface): override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) { val ids = freenetRequest.parameters["id", 65536]!!.split(" ") when (freenetRequest.parameters["type", 5]) { - "sone" -> ids.mapPresent(webInterface.core::getSone).forEach(webInterface.core::markSoneKnown) + "sone" -> ids.mapNotNull(webInterface.core::getSone).forEach(webInterface.core::markSoneKnown) "post" -> ids.mapPresent(webInterface.core::getPost).forEach(webInterface.core::markPostKnown) - "reply" -> ids.mapPresent(webInterface.core::getPostReply).forEach(webInterface.core::markReplyKnown) + "reply" -> ids.mapNotNull(webInterface.core::getPostReply).forEach(webInterface.core::markReplyKnown) else -> throw RedirectException("invalid.html") } throw RedirectException(freenetRequest.parameters["returnPage", 256]!!)