mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6fff5b2757
@ -50,8 +50,7 @@ fun <T : ProtoBuf> ByteReadPacket.decodeUniPacket(deserializer: DeserializationS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun <R> ByteReadPacket.decodeUniRequestPacketAndDeserialize(name: String? = null, block: (ByteArray) -> R): R {
|
||||||
private fun <R> ByteReadPacket.decodeUniRequestPacketAndDeserialize(name: String? = null, block: (ByteArray) -> R): R {
|
|
||||||
val request = this.readRemainingAsJceStruct(RequestPacket.serializer())
|
val request = this.readRemainingAsJceStruct(RequestPacket.serializer())
|
||||||
|
|
||||||
return block(if (name == null) when (request.iVersion.toInt()) {
|
return block(if (name == null) when (request.iVersion.toInt()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user