From 1abfcf43179d63fb645454561ac82fca4f2d8e6a Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 5 Jul 2021 15:00:11 +0800 Subject: [PATCH] Add `OfflineAnnouncement.serializer` --- .../kotlin/contact/announcement/OfflineAnnouncement.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirai-core-api/src/commonMain/kotlin/contact/announcement/OfflineAnnouncement.kt b/mirai-core-api/src/commonMain/kotlin/contact/announcement/OfflineAnnouncement.kt index b30769c66..17b758b9e 100644 --- a/mirai-core-api/src/commonMain/kotlin/contact/announcement/OfflineAnnouncement.kt +++ b/mirai-core-api/src/commonMain/kotlin/contact/announcement/OfflineAnnouncement.kt @@ -31,6 +31,9 @@ public sealed interface OfflineAnnouncement : Announcement { public companion object { public const val SERIAL_NAME: String = "OfflineAnnouncement" + @JvmStatic + public fun serializer(): KSerializer = Serializer + /** * 创建 [OfflineAnnouncement]. 若 [announcement] 类型为 [OfflineAnnouncement] 则直接返回 [announcement]. */