X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetNotificationsAjaxPage.kt;h=66c8ed2dce6b6d3b7a139fcd269683a12ad9564e;hp=db6e5c5f8a411895a26216aea8a92b778ce5cb6c;hb=4c5ec477a0f12a4cee0143636fe015e83eec5060;hpb=6d422fb5879ac6f6211973cf99de9b55f16f1f72 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt index db6e5c5..66c8ed2 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt @@ -3,8 +3,7 @@ package net.pterodactylus.sone.web.ajax import net.pterodactylus.sone.data.Sone import net.pterodactylus.sone.data.SoneOptions import net.pterodactylus.sone.main.SonePlugin -import net.pterodactylus.sone.utils.jsonArray -import net.pterodactylus.sone.utils.jsonObject +import net.pterodactylus.sone.utils.* import net.pterodactylus.sone.web.WebInterface import net.pterodactylus.sone.web.page.* import net.pterodactylus.util.notify.Notification @@ -74,5 +73,3 @@ private val SoneOptions?.asJsonObject "ShowNotification/NewReplies" to options.isShowNewReplyNotifications ) } ?: jsonObject {} - -private fun Notification.render() = StringWriter().use { it.also { render(it) } }.toString()