Fix no such member when kick

This commit is contained in:
Him188 2020-02-15 19:02:33 +08:00
parent 751d653545
commit ecfcc183e1

View File

@ -131,7 +131,7 @@ internal class OnlinePush {
val groupUin = content.fromUin
bot.getGroupByUin(groupUin).let { group ->
val member = group[target] as MemberImpl
val member = group.getOrNull(target) as? MemberImpl ?: return NoPacket
this.discardExact(1)
return MemberLeaveEvent.Kick(member.also {
group.members.delegate.remove(member)