Skip to content

Commit

Permalink
[core] 移除 Sub8AMsgInfo 中未使用的字段, 以修复序列化问题, close #2784
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Aug 27, 2023
1 parent 790ad7f commit 684b003
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -117,21 +119,25 @@ 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) {
//戳一戳
1132L, 1133L, 1134L, 1135L, 1136L, 10043L -> handlePrivateNudge(body)
}
}

0x8AL -> {
val body = vProtobuf.loadAs(Sub8A.serializer())
processFriendRecall(body)
}

else -> markNotConsumed()
}
}
Expand All @@ -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
Expand Down Expand Up @@ -207,6 +214,7 @@ internal class FriendNoticeProcessor(
friend.info.nick = to
}
}

else -> containsUnknown = true
}
}
Expand Down

0 comments on commit 684b003

Please sign in to comment.