mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 23:50:08 +08:00
Simplify logic
This commit is contained in:
parent
b3112dada3
commit
beb83885c8
@ -47,6 +47,8 @@ import net.mamoe.mirai.internal.network.protocol.packet.list.FriendList
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.login.StatSvc
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.sendAndExpect
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.summarycard.SummaryCard
|
||||
import net.mamoe.mirai.internal.network.psKey
|
||||
import net.mamoe.mirai.internal.network.sKey
|
||||
import net.mamoe.mirai.internal.utils.MiraiProtocolInternal
|
||||
import net.mamoe.mirai.internal.utils.crypto.TEA
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.loadAs
|
||||
@ -579,7 +581,7 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
|
||||
headers {
|
||||
append(
|
||||
"cookie",
|
||||
"uin=o${id}; skey=${client.wLoginSigInfo.sKey.data.encodeToString()}; p_uin=o${id};"
|
||||
"uin=o${bot.id}; skey=${bot.sKey}; p_uin=o${bot.id};"
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -602,10 +604,10 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
|
||||
headers {
|
||||
append(
|
||||
"cookie",
|
||||
"uin=o${id};" +
|
||||
" skey=${client.wLoginSigInfo.sKey.data.encodeToString()};" +
|
||||
" p_uin=o${id};" +
|
||||
" p_skey=${client.wLoginSigInfo.psKeyMap["qun.qq.com"]?.data?.encodeToString()}; "
|
||||
"uin=o${bot.id};" +
|
||||
" skey=${bot.sKey};" +
|
||||
" p_uin=o${bot.id};" +
|
||||
" p_skey=${bot.psKey("qun.qq.com")}; "
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -794,7 +796,7 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
|
||||
headers {
|
||||
append(
|
||||
"cookie",
|
||||
"uin=o${bot.id}; skey=${bot.client.wLoginSigInfo.sKey.data.encodeToString()};"
|
||||
"uin=o${bot.id}; skey=${bot.sKey};"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user