diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/Voice.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/Voice.kt index f564ab225..ce9538f4d 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/Voice.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/Voice.kt @@ -47,9 +47,11 @@ public class Voice @MiraiInternalAPI constructor( } public val url: String? - get() = - if (_url.startsWith("http")) _url - else null + get() = when { + _url.isBlank() -> null + _url.startsWith("http") -> _url + else -> "http://grouptalk.c2c.qq.com$_url" + } private var _stringValue: String? = null get() = field ?: kotlin.run {