mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-30 01:40:29 +08:00
Fix adjustImageId
This commit is contained in:
parent
83432a9e03
commit
37ac7d8cbe
@ -69,7 +69,8 @@ private operator fun String.get(range: IntRange) = this.substring(range)
|
|||||||
// 需要调整 {724D9512-2B54-EEAC-1E21-4AAAC37259DF}.gif
|
// 需要调整 {724D9512-2B54-EEAC-1E21-4AAAC37259DF}.gif
|
||||||
|
|
||||||
private fun String.adjustImageId() =
|
private fun String.adjustImageId() =
|
||||||
"{${this[0..7]}-${this[8..11]}-${this[12..15]}-${this[16..19]}-${this[20..31]}}.${this.substringAfterLast(".")}"
|
if (this.first() == '{') this
|
||||||
|
else "{${this[0..7]}-${this[8..11]}-${this[12..15]}-${this[16..19]}-${this[20..31]}}.${this.substringAfterLast(".")}"
|
||||||
|
|
||||||
internal fun ByteReadPacket.readMessage(): Message? {
|
internal fun ByteReadPacket.readMessage(): Message? {
|
||||||
val messageType = this.readByte().toInt()
|
val messageType = this.readByte().toInt()
|
||||||
|
Loading…
Reference in New Issue
Block a user