1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-05-06 05:52:33 +08:00

QQA Debugging update

This commit is contained in:
Him188 2020-01-24 13:56:19 +08:00
parent 21fc9e129e
commit ada7b7da0f
3 changed files with 3 additions and 3 deletions
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet

View File

@ -63,7 +63,7 @@ internal val EMPTY_BYTE_ARRAY = ByteArray(0)
@UseExperimental(MiraiInternalAPI::class)
internal inline fun PacketFactory<*>.buildOutgingPacket(
client: QQAndroidClient,
name: String? = null,
name: String? = this.commandName,
commandName: String = this.commandName,
key: ByteArray,
body: BytePacketBuilder.(sequenceId: Int) -> Unit

View File

@ -12,7 +12,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgingPacket
internal object ImageDownPacket : PacketFactory<ImageDownPacket.ImageDownPacketResponse>("LongConn.OffPicDown") {
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(
Cmd0x352Packet.serializer(),
Cmd0x352Packet.createByImageRequest(req)

View File

@ -12,7 +12,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.packet.buildOutgingPacket
internal object ImageUpPacket : PacketFactory<ImageUpPacket.ImageUpPacketResponse>("LongConn.OffPicUp") {
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(
Cmd0x352Packet.serializer(),
Cmd0x352Packet.createByImageRequest(req)