Commit ada7b7da authored by Him188's avatar Him188

QQA Debugging update

parent 21fc9e12
...@@ -63,7 +63,7 @@ internal val EMPTY_BYTE_ARRAY = ByteArray(0) ...@@ -63,7 +63,7 @@ internal val EMPTY_BYTE_ARRAY = ByteArray(0)
@UseExperimental(MiraiInternalAPI::class) @UseExperimental(MiraiInternalAPI::class)
internal inline fun PacketFactory<*>.buildOutgingPacket( internal inline fun PacketFactory<*>.buildOutgingPacket(
client: QQAndroidClient, client: QQAndroidClient,
name: String? = null, name: String? = this.commandName,
commandName: String = this.commandName, commandName: String = this.commandName,
key: ByteArray, key: ByteArray,
body: BytePacketBuilder.(sequenceId: Int) -> Unit body: BytePacketBuilder.(sequenceId: Int) -> Unit
......
...@@ -12,7 +12,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgingPacket ...@@ -12,7 +12,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgingPacket
internal object ImageDownPacket : PacketFactory<ImageDownPacket.ImageDownPacketResponse>("LongConn.OffPicDown") { internal object ImageDownPacket : PacketFactory<ImageDownPacket.ImageDownPacketResponse>("LongConn.OffPicDown") {
operator fun invoke(client: QQAndroidClient, req: GetImgUrlReq): OutgoingPacket { operator fun invoke(client: QQAndroidClient, req: GetImgUrlReq): OutgoingPacket {
return buildOutgingPacket(client, this.commandName, this.commandName, client.wLoginSigInfo.d2Key) { return buildOutgingPacket(client, key = client.wLoginSigInfo.d2Key) {
ProtoBuf.dump( ProtoBuf.dump(
Cmd0x352Packet.serializer(), Cmd0x352Packet.serializer(),
Cmd0x352Packet.createByImageRequest(req) Cmd0x352Packet.createByImageRequest(req)
......
...@@ -12,7 +12,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgingPacket ...@@ -12,7 +12,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgingPacket
internal object ImageUpPacket : PacketFactory<ImageUpPacket.ImageUpPacketResponse>("LongConn.OffPicUp") { internal object ImageUpPacket : PacketFactory<ImageUpPacket.ImageUpPacketResponse>("LongConn.OffPicUp") {
operator fun invoke(client: QQAndroidClient, req: UploadImgReq): OutgoingPacket { operator fun invoke(client: QQAndroidClient, req: UploadImgReq): OutgoingPacket {
return buildOutgingPacket(client, this.commandName, this.commandName, client.wLoginSigInfo.d2Key) { return buildOutgingPacket(client, key = client.wLoginSigInfo.d2Key) {
ProtoBuf.dump( ProtoBuf.dump(
Cmd0x352Packet.serializer(), Cmd0x352Packet.serializer(),
Cmd0x352Packet.createByImageRequest(req) Cmd0x352Packet.createByImageRequest(req)
......
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