mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Use coroutineContext from qq
This commit is contained in:
parent
b18dad9612
commit
cff2fc585c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user