mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-24 10:50:14 +08:00
Add MultiMsg.ApplyDown
This commit is contained in:
parent
b3af7a14cf
commit
5857d1b2ee
@ -23,7 +23,7 @@ internal class MultiMsg : ProtoBuf {
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
internal class MultiMsgApplyDownReq(
|
internal class MultiMsgApplyDownReq(
|
||||||
@ProtoNumber(1) @JvmField val msgResid: ByteArray = EMPTY_BYTE_ARRAY,
|
@ProtoNumber(1) @JvmField val msgResid: String = "",
|
||||||
@ProtoNumber(2) @JvmField val msgType: Int = 0,
|
@ProtoNumber(2) @JvmField val msgType: Int = 0,
|
||||||
@ProtoNumber(3) @JvmField val srcUin: Long = 0L
|
@ProtoNumber(3) @JvmField val srcUin: Long = 0L
|
||||||
) : ProtoBuf
|
) : ProtoBuf
|
||||||
|
@ -153,6 +153,7 @@ internal object KnownPacketFactories {
|
|||||||
Heartbeat.Alive,
|
Heartbeat.Alive,
|
||||||
PbMessageSvc.PbMsgWithDraw,
|
PbMessageSvc.PbMsgWithDraw,
|
||||||
MultiMsg.ApplyUp,
|
MultiMsg.ApplyUp,
|
||||||
|
MultiMsg.ApplyDown,
|
||||||
NewContact.SystemMsgNewFriend,
|
NewContact.SystemMsgNewFriend,
|
||||||
NewContact.SystemMsgNewGroup,
|
NewContact.SystemMsgNewGroup,
|
||||||
ProfileService.GroupMngReq,
|
ProfileService.GroupMngReq,
|
||||||
|
@ -151,4 +151,41 @@ internal class MultiMsg {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object ApplyDown: OutgoingPacketFactory<ApplyDown.Response>("MultiMsg.ApplyDown") {
|
||||||
|
sealed class Response : Packet {
|
||||||
|
|
||||||
|
object MessageTooLarge : Response()
|
||||||
|
}
|
||||||
|
|
||||||
|
operator fun invoke(
|
||||||
|
client: QQAndroidClient,
|
||||||
|
buType: Int,
|
||||||
|
resId: String,
|
||||||
|
msgType: Int,
|
||||||
|
) = buildOutgoingUniPacket(client) {
|
||||||
|
writeProtoBuf(
|
||||||
|
MultiMsg.ReqBody.serializer(),
|
||||||
|
MultiMsg.ReqBody(
|
||||||
|
buType = buType, // 1: long, 2: 合并转发
|
||||||
|
buildVer = "8.2.0.1296",
|
||||||
|
multimsgApplydownReq = listOf(
|
||||||
|
MultiMsg.MultiMsgApplyDownReq(
|
||||||
|
msgResid = resId,
|
||||||
|
msgType = msgType,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
netType = 3, // wifi=3, wap=5
|
||||||
|
platformType = 9,
|
||||||
|
subcmd = 2,
|
||||||
|
termType = 5,
|
||||||
|
reqChannelType = 2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): Response {
|
||||||
|
return Response.MessageTooLarge
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user