mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-03 01:39:35 +08:00
Fix: add host for Voice.url (#584)
* Fix: add host for Voice.url * Full return url for Voice
This commit is contained in:
parent
1faccc72f3
commit
152709a0f1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user