Return a nullable PostReply instead of an Optional
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / ajax / LikeAjaxPage.kt
index 4257725..576bf90 100644 (file)
@@ -20,7 +20,7 @@ class LikeAjaxPage(webInterface: WebInterface) : LoggedInJsonPage("like.ajax", w
                                                ?.let { createSuccessJsonObject() }
                                                ?: createErrorJsonObject("invalid-post-id")
                                "reply" -> request.parameters["reply"]
-                                               .let(core::getPostReply)
+                                               ?.let(core::getPostReply)
                                                ?.let { currentSone.addLikedReplyId(it.id) }
                                                ?.also { core.touchConfiguration() }
                                                ?.let { createSuccessJsonObject() }