mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-01 12:00:34 +08:00
fix: imageId parse error
This commit is contained in:
parent
685e552d5c
commit
929501c132
@ -64,14 +64,14 @@ private fun calculateImageMd5ByImageId(imageId: String): ByteArray {
|
||||
return if (imageId.startsWith('/')) {
|
||||
imageId
|
||||
.drop(1)
|
||||
.replace('-', ' ')
|
||||
.replace("-", "")
|
||||
.take(16 * 2)
|
||||
.chunkedHexToBytes()
|
||||
} else {
|
||||
imageId
|
||||
.substringAfter('{')
|
||||
.substringBefore('}')
|
||||
.replace('-', ' ')
|
||||
.replace("-", "")
|
||||
.chunkedHexToBytes()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user