X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FCreateReplyPage.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FCreateReplyPage.kt;h=a3fc1f3cd8a9e2d6cd86d76a2eb6d73ac269735d;hp=a6c58e4295932621a5eb4e04616ac507e72743e3;hb=fd32e307db87c617a4c455f592b6e649ec50ae8a;hpb=ff4bc3606b33e9796ff4fbae087b4224d02cf0d0 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateReplyPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateReplyPage.kt index a6c58e4..a3fc1f3 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateReplyPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateReplyPage.kt @@ -22,7 +22,7 @@ class CreateReplyPage(template: Template, webInterface: WebInterface): templateContext["errorTextEmpty"] = true return } - val post = webInterface.core.getPost(postId).orNull() ?: throw RedirectException("noPermission.html") + val post = webInterface.core.getPost(postId) ?: throw RedirectException("noPermission.html") val sender = webInterface.core.getLocalSone(freenetRequest.httpRequest.getPartAsStringFailsafe("sender", 43)) ?: getCurrentSone(freenetRequest.toadletContext) webInterface.core.createReply(sender, post, TextFilter.filter(freenetRequest.httpRequest.getHeader("Host"), text)) throw RedirectException(returnPage)