Return a nullable PostReply instead of an Optional
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / MarkAsKnownPage.kt
index bc96af5..31e70fc 100644 (file)
@@ -20,7 +20,7 @@ class MarkAsKnownPage(template: Template, webInterface: WebInterface):
                when (freenetRequest.parameters["type", 5]) {
                        "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]!!)