1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-14 23:20:49 +08:00

fix: null handle

This commit is contained in:
cssxsh 2023-07-22 08:21:25 +08:00
parent 2b40cb5a35
commit db214e8e71
No known key found for this signature in database
GPG Key ID: 92849F91CA9D8ECE

View File

@ -325,8 +325,9 @@ internal class GroupNotificationProcessor(
data: MsgType0x2DC,
) = data.context {
val grayTip = buf.loadAs(TroopTips0x857.NotifyMsgBody.serializer(), 1).optGeneralGrayTip
?: return@context
markAsConsumed()
when (grayTip?.templId) {
when (grayTip.templId) {
// 群幸运词
10047L, 10048L -> {
val user = grayTip.msgTemplParam["uin"]?.findMember() ?: group.botAsMember
@ -446,7 +447,7 @@ internal class GroupNotificationProcessor(
else -> {
markNotConsumed()
logger.debug {
"Unknown Transformers528 0x14 template\ntemplId=${grayTip?.templId}\nPermList=${grayTip?.msgTemplParam?.structureToString()}"
"Unknown Transformers528 0x14 template\ntemplId=${grayTip.templId}\nPermList=${grayTip.msgTemplParam.structureToString()}"
}
}
}