diff --git a/mirai-core/src/commonMain/kotlin/message/OnlineAudioImpl.kt b/mirai-core/src/commonMain/kotlin/message/OnlineAudioImpl.kt index 9ad621c3f..16a94c81f 100644 --- a/mirai-core/src/commonMain/kotlin/message/OnlineAudioImpl.kt +++ b/mirai-core/src/commonMain/kotlin/message/OnlineAudioImpl.kt @@ -66,7 +66,7 @@ internal class AudioExtraData( @Serializable class Wrapper( @ProtoNumber(1) val version: Int, - @ProtoNumber(2) val v1: AudioExtraData, + @ProtoNumber(2) val v1: AudioExtraData? = null, ) : ProtoBuf private const val CURRENT_VERSION = 1 @@ -75,7 +75,7 @@ internal class AudioExtraData( fun loadFrom(byteArray: ByteArray?): AudioExtraData? { byteArray ?: return null return kotlin.runCatching { - byteArray.loadAs(Wrapper.serializer()).v1 + byteArray.loadAs(Wrapper.serializer()).v1 // in this version we only support v1 }.getOrNull() } }