Commit 745200f6 authored by Him188's avatar Him188

Fix group image

parent 1f521e96
......@@ -167,7 +167,8 @@ fun MessageChain.toPacket(forGroup: Boolean): ByteReadPacket = buildPacket {
is At -> throw UnsupportedOperationException("At is not supported now but is expecting to be supported")
is Image -> buildPacket {
if (forGroup) {
when (id.value.length) {
42 -> {
writeUByte(MessageType.GROUP_IMAGE.value)
//00 00 03 00 CB 02 00 2A 7B 46 36 31 35 39 33 42 35 2D 35 42 39 38 2D 31 37 39 38 2D 33 46 34 37 2D 32 41 39 31 44 33 32 45 44 32 46 43 7D 2E 6A 70 67
......@@ -185,7 +186,9 @@ fun MessageChain.toPacket(forGroup: Boolean): ByteReadPacket = buildPacket {
writeStringUtf8(id.value)
writeUByte(0x41u)
}
} else {
}
37 -> {
writeUByte(MessageType.FRIEND_IMAGE.value)
// 00 00 06 00 F3 02
......@@ -253,6 +256,8 @@ fun MessageChain.toPacket(forGroup: Boolean): ByteReadPacket = buildPacket {
writeUByte(0x41u)
}
}
else -> error("Illegal ImageId ${id.value}")
}
}
is PlainText -> buildPacket {
......
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