From 684b003764ee6a47e5485f37fe166dcda80ba300 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 27 Aug 2023 12:31:00 +0800 Subject: [PATCH] =?UTF-8?q?[core]=20=E7=A7=BB=E9=99=A4=20Sub8AMsgInfo=20?= =?UTF-8?q?=E4=B8=AD=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=AD=97=E6=AE=B5?= =?UTF-8?q?,=20=E4=BB=A5=E4=BF=AE=E5=A4=8D=E5=BA=8F=E5=88=97=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98,=20close=20#2784?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/priv/FriendNoticeProcessor.kt | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/network/notice/priv/FriendNoticeProcessor.kt b/mirai-core/src/commonMain/kotlin/network/notice/priv/FriendNoticeProcessor.kt index 99e3c00f92..5763f6bb97 100644 --- a/mirai-core/src/commonMain/kotlin/network/notice/priv/FriendNoticeProcessor.kt +++ b/mirai-core/src/commonMain/kotlin/network/notice/priv/FriendNoticeProcessor.kt @@ -102,10 +102,12 @@ internal class FriendNoticeProcessor( val body: SubMsgType0xb3.MsgBody = vProtobuf.loadAs(SubMsgType0xb3.MsgBody.serializer()) handleFriendAddedB(data, body) } + 0x44L -> { val body = vProtobuf.loadAs(Submsgtype0x44.MsgBody.serializer()) handleFriendAddedA(body) } + 0x27L -> { val body = vProtobuf.loadAs(SubMsgType0x27MsgBody.serializer()) for (msgModInfo in body.msgModInfos) { @@ -117,10 +119,12 @@ internal class FriendNoticeProcessor( } } } + 0x115L -> { val body = vProtobuf.loadAs(SubMsgType0x115.MsgBody.serializer()) handleInputStatusChanged(body) } + 0x122L -> { val body = vProtobuf.loadAs(Submsgtype0x122.Submsgtype0x122.MsgBody.serializer()) when (body.templId) { @@ -128,10 +132,12 @@ internal class FriendNoticeProcessor( 1132L, 1133L, 1134L, 1135L, 1136L, 10043L -> handlePrivateNudge(body) } } + 0x8AL -> { val body = vProtobuf.loadAs(Sub8A.serializer()) processFriendRecall(body) } + else -> markNotConsumed() } } @@ -150,12 +156,13 @@ internal class FriendNoticeProcessor( @ProtoNumber(3) val srcId: Int, @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(12) val flag: Int, // 1 - @ProtoNumber(13) val wording: Wording, + // see #2784 +// @ProtoNumber(6) val random: Int, +// @ProtoNumber(7) val pkgNum: Int, // 1 +// @ProtoNumber(8) val pkgIndex: Int, // 0 +// @ProtoNumber(9) val devSeq: Int, // 0 +// @ProtoNumber(12) val flag: Int, // 1 +// @ProtoNumber(13) val wording: Wording, ) : ProtoBuf @Serializable @@ -207,6 +214,7 @@ internal class FriendNoticeProcessor( friend.info.nick = to } } + else -> containsUnknown = true } }