Use coroutineContext from qq

This commit is contained in:
Him188 2019-12-06 20:52:51 +08:00
parent b18dad9612
commit cff2fc585c

View File

@ -16,7 +16,6 @@ import net.mamoe.mirai.getQQ
import net.mamoe.mirai.network.BotNetworkHandler
import net.mamoe.mirai.utils.MiraiInternalAPI
import net.mamoe.mirai.utils.io.discardExact
import kotlin.coroutines.coroutineContext
/**
* 成员加入前的事件. 群的成员列表中还没有这个人
@ -75,7 +74,8 @@ internal object MemberJoinPacketHandler : KnownEventParserAndHandler<MemberJoinE
val group = bot.getGroup(readUInt())
discardExact(1) // 01
val member = Member(bot.getQQ(readUInt()), group, MemberPermission.MEMBER, coroutineContext)
val qq = bot.getQQ(readUInt())
val member = Member(qq, group, MemberPermission.MEMBER, qq.coroutineContext)
return if (readByte().toInt() == 0x03) {
MemberJoinEventPacket(member, null)