diff --git a/build.gradle.kts b/build.gradle.kts index 034acfd..0ce8861 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "xyz.cssxsh" -version = "1.3.1" +version = "1.3.2" mavenCentralPublish { useCentralS01() diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index d262f1f..4fad538 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -1,10 +1,10 @@ object Versions { // mirai - const val mirai = "2.6.7" + const val mirai = "2.7.1" // kotlin - const val kotlin = "1.5.21" - const val ktor = "1.5.1" + const val kotlin = "1.5.31" + const val ktor = "1.5.4" // other const val junit = "5.2.0" } \ No newline at end of file diff --git a/src/main/kotlin/xyz/cssxsh/arknights/penguin/Data.kt b/src/main/kotlin/xyz/cssxsh/arknights/penguin/Data.kt index 0c7a5c5..05dd53b 100644 --- a/src/main/kotlin/xyz/cssxsh/arknights/penguin/Data.kt +++ b/src/main/kotlin/xyz/cssxsh/arknights/penguin/Data.kt @@ -176,7 +176,7 @@ fun Iterable.now() = time(OffsetDateTime.now()) typealias I18n = Map object OffsetDataTimeSerializer : KSerializer { - @OptIn(InternalSerializationApi::class) + @OptIn(InternalSerializationApi::class, ExperimentalSerializationApi::class) override val descriptor: SerialDescriptor get() = buildSerialDescriptor(OffsetDateTime::class.qualifiedName!!, PrimitiveKind.LONG) diff --git a/src/main/kotlin/xyz/cssxsh/arknights/weibo/Status.kt b/src/main/kotlin/xyz/cssxsh/arknights/weibo/Status.kt index b6068aa..e66bf17 100644 --- a/src/main/kotlin/xyz/cssxsh/arknights/weibo/Status.kt +++ b/src/main/kotlin/xyz/cssxsh/arknights/weibo/Status.kt @@ -18,7 +18,11 @@ const val BLOG_API = "https://m.weibo.cn/api/container/getIndex" const val CONTENT_API = "https://m.weibo.cn/statuses/extend" private fun File.readMicroBlogHistory(type: BlogUser): List { - return read>(type).data().cards.map { it.blog } + return if (type == BlogUser.PICTURE) { + emptyList() + } else { + read>(type).data().cards.map { it.blog } + } } private fun File.readMicroBlogPicture(type: BlogUser): List { @@ -192,13 +196,13 @@ private val PictureData.blogs get() = cards.flatMap { it.group }.flatMap { it.pi @Serializable private data class PictureData( @SerialName("cards") - val cards: List + val cards: List = emptyList() ) @Serializable private data class PictureCard( @SerialName("card_group") - val group: List, + val group: List = emptyList() ) @Serializable diff --git a/src/main/kotlin/xyz/cssxsh/mirai/plugin/ArknightsHelperPlugin.kt b/src/main/kotlin/xyz/cssxsh/mirai/plugin/ArknightsHelperPlugin.kt index 1525e18..851f0b9 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/plugin/ArknightsHelperPlugin.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/plugin/ArknightsHelperPlugin.kt @@ -7,7 +7,7 @@ import xyz.cssxsh.arknights.* import xyz.cssxsh.mirai.plugin.command.* object ArknightsHelperPlugin : KotlinPlugin( - JvmPluginDescription("xyz.cssxsh.mirai.plugin.arknights-helper", "1.3.1") { + JvmPluginDescription("xyz.cssxsh.mirai.plugin.arknights-helper", "1.3.2") { name("arknights-helper") author("cssxsh") }