Commit f0c75277 authored by Him188's avatar Him188

Fix RequestFriendImageId

parent 046d8968
...@@ -12,7 +12,7 @@ internal fun IoBuffer.parseMessageFace(): Face { ...@@ -12,7 +12,7 @@ internal fun IoBuffer.parseMessageFace(): Face {
discardExact(1) discardExact(1)
val id1 = FaceID.ofId(readLVNumber().toInt().toUByte())//可能这个是id, 也可能下面那个 val id1 = FaceID.ofId(readLVNumber().toInt().toUByte())//可能这个是id, 也可能下面那个
discardExact(readByte().toLong()) discardExact(readByte().toLong()) // -1
readLVNumber()//某id? readLVNumber()//某id?
return Face(id1) return Face(id1)
} }
......
...@@ -104,7 +104,7 @@ object CanAddFriendPacket : SessionPacketFactory<CanAddFriendResponse>() { ...@@ -104,7 +104,7 @@ object CanAddFriendPacket : SessionPacketFactory<CanAddFriendResponse>() {
} }
val qq: QQ = readUInt().qq() val qq: QQ = readUInt().qq()
discardExact(1) // debugDiscardExact(1)
return when (val state = readUByte().toUInt()) { return when (val state = readUByte().toUInt()) {
//09 4E A4 B1 00 03 //09 4E A4 B1 00 03
......
...@@ -59,13 +59,13 @@ fun BytePacketBuilder.writeHex(uHex: String) { ...@@ -59,13 +59,13 @@ fun BytePacketBuilder.writeHex(uHex: String) {
fun BytePacketBuilder.writeTLV(tag: UByte, values: UByteArray) { fun BytePacketBuilder.writeTLV(tag: UByte, values: UByteArray) {
writeUByte(tag) writeUByte(tag)
writeVarInt(values.size) writeUVarInt(values.size.toUInt())
writeFully(values) writeFully(values)
} }
fun BytePacketBuilder.writeTLV(tag: UByte, values: ByteArray) { fun BytePacketBuilder.writeTLV(tag: UByte, values: ByteArray) {
writeUByte(tag) writeUByte(tag)
writeVarInt(values.size) writeUVarInt(values.size.toUInt())
writeFully(values) writeFully(values)
} }
......
...@@ -54,6 +54,7 @@ suspend fun main() { ...@@ -54,6 +54,7 @@ suspend fun main() {
bot.subscribeMessages { bot.subscribeMessages {
"你好" reply "你好!" "你好" reply "你好!"
"profile" reply { "profile" reply {
sender.profile.await().toString() sender.profile.await().toString()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment