From a097e494ef8b4f54b0e3d4cee2ef5ff173ed74a7 Mon Sep 17 00:00:00 2001 From: sandtechnology <20417547+sandtechnology@users.noreply.github.com> Date: Sun, 20 Dec 2020 20:58:53 +0800 Subject: [PATCH] Fix Sub8A (#742) * Fix Sub8A * Fix error --- .../packet/chat/receive/OnlinePush.ReqPush.kt | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt index 03f3eee3f..e6b6cfc23 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt @@ -412,20 +412,25 @@ internal inline fun lambda528(crossinline block: MsgType0x210.(QQAndroidBot, Msg internal object Transformers528 : Map by mapOf( 0x8AL to lambda528 { bot -> + @Serializable + class Wording( + @ProtoNumber(1) val itemID: Int = 0, + @ProtoNumber(2) val itemName: String = "" + ) : ProtoBuf + @Serializable class Sub8AMsgInfo( @ProtoNumber(1) val fromUin: Long, @ProtoNumber(2) val botUin: Long, @ProtoNumber(3) val srcId: Int, - @ProtoNumber(4) val srcInternalId: Int, - @ProtoNumber(5) val time: Int, - @ProtoNumber(6) val random: Int, // 同srcInternalId + @ProtoNumber(4) val srcInternalId: Long, + @ProtoNumber(5) val time: Long, + @ProtoNumber(6) val random: Int, @ProtoNumber(7) val pkgNum: Int, // 1 @ProtoNumber(8) val pkgIndex: Int, // 0 @ProtoNumber(9) val devSeq: Int, // 0 - @ProtoNumber(10) val unknown1: Int = 0, // ? 补 id - @ProtoNumber(11) val unknown2: Int = 0, // ? - @ProtoNumber(12) val flag: Int // 1 + @ProtoNumber(12) val flag: Int, // 1 + @ProtoNumber(13) val wording: Wording ) : ProtoBuf @Serializable @@ -442,8 +447,8 @@ internal object Transformers528 : Map by mapOf( MessageRecallEvent.FriendRecall( bot = bot, messageIds = intArrayOf(it.srcId), - messageInternalIds = intArrayOf(it.srcInternalId), - messageTime = it.time, + messageInternalIds = intArrayOf(it.srcInternalId.toInt()), + messageTime = it.time.toInt(), operatorId = it.fromUin ) }