mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 23:20:09 +08:00
Improve inspection performance
This commit is contained in:
parent
b3e77119fb
commit
f8d8ffb782
@ -106,7 +106,10 @@ internal object OnlinePushPbPushGroupMsg : IncomingPacketFactory<Packet?>("Onlin
|
|||||||
sender = group.newAnonymous(anonymous.anonNick.encodeToString(), anonymous.anonId.encodeToBase64())
|
sender = group.newAnonymous(anonymous.anonNick.encodeToString(), anonymous.anonId.encodeToBase64())
|
||||||
name = sender.nameCard
|
name = sender.nameCard
|
||||||
} else { // normal member chat
|
} else { // normal member chat
|
||||||
sender = group[msgHead.fromUin] as NormalMemberImpl
|
sender = group[msgHead.fromUin] as NormalMemberImpl? ?: kotlin.run {
|
||||||
|
bot.network.logger.warning { "Failed to find member ${msgHead.fromUin} in group ${group.id}" }
|
||||||
|
return null
|
||||||
|
}
|
||||||
name = findSenderName(extraInfo, msgHead.groupInfo) ?: sender.nameCardOrNick
|
name = findSenderName(extraInfo, msgHead.groupInfo) ?: sender.nameCardOrNick
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user