mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-24 02:40:13 +08:00
Add MultiMsg.ApplyDown
This commit is contained in:
parent
b3af7a14cf
commit
5857d1b2ee
@ -23,7 +23,7 @@ internal class MultiMsg : ProtoBuf {
|
||||
|
||||
@Serializable
|
||||
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(3) @JvmField val srcUin: Long = 0L
|
||||
) : ProtoBuf
|
||||
|
@ -153,6 +153,7 @@ internal object KnownPacketFactories {
|
||||
Heartbeat.Alive,
|
||||
PbMessageSvc.PbMsgWithDraw,
|
||||
MultiMsg.ApplyUp,
|
||||
MultiMsg.ApplyDown,
|
||||
NewContact.SystemMsgNewFriend,
|
||||
NewContact.SystemMsgNewGroup,
|
||||
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