X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FDeleteReplyPage.kt;h=ddaaf5e20306d70874cabcb8b127a85bdc513ae1;hp=c67d620fb6f9f92f5079447ae556ac78a031a644;hb=fafe0029dcbef27ce918fdf7007e78c8705ca20f;hpb=d920774a69518c31b5e66d36b830bcf95a5ec237 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteReplyPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteReplyPage.kt index c67d620..ddaaf5e 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteReplyPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteReplyPage.kt @@ -15,7 +15,7 @@ class DeleteReplyPage(template: Template, webInterface: WebInterface): override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) { if (freenetRequest.isPOST) { val replyId = freenetRequest.httpRequest.getPartAsStringFailsafe("reply", 36) - val reply = webInterface.core.getPostReply(replyId).orNull() ?: throw RedirectException("noPermission.html") + val reply = webInterface.core.getPostReply(replyId) ?: throw RedirectException("noPermission.html") if (!reply.sone.isLocal) { throw RedirectException("noPermission.html") }