Correct group syncing logic again, Fix #1120 (#1123)

This commit is contained in:
sandtechnology 2021-03-28 22:48:38 +08:00 committed by GitHub
parent de170325c9
commit 70bbfcf786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,6 @@
package net.mamoe.mirai.internal.network.protocol.packet.chat.receive
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.sync.withLock
import kotlinx.io.core.*
import kotlinx.serialization.Serializable
@ -621,7 +620,7 @@ internal object Transformers528 : Map<Long, Lambda528> by mapOf(
when (msg.msgGroupMsgSync.msgType) {
1, 2 -> {
bot.groupListModifyLock.withLock {
bot.createGroupForBot(msg.msgGroupMsgSync.grpCode)?.let {
bot.createGroupForBot(Mirai.calculateGroupUinByGroupCode(msg.msgGroupMsgSync.grpCode))?.let {
packetList.add(BotJoinGroupEvent.Active(it))
}
}