mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 05:40:10 +08:00
Remove unused EncryptServiceContext value and pass QUA
All final value only need to passed to initialize method
This commit is contained in:
parent
19132b359b
commit
8af6c3fcf6
@ -125,6 +125,7 @@ internal class EcdhInitialPublicKeyUpdaterImpl(
|
||||
set(EncryptServiceContext.KEY_DEVICE_INFO, bot.client.device)
|
||||
set(EncryptServiceContext.KEY_BOT_PROTOCOL, bot.configuration.protocol)
|
||||
set(EncryptServiceContext.KEY_QIMEI36, bot.client.qimei36 ?: "")
|
||||
set(EncryptServiceContext.KEY_APP_QUA, "V1_AND_SQ_8.9.58_4106_YYB_D") // 8.9.58
|
||||
set(EncryptServiceContext.KEY_BOT_WORKING_DIR, bot.configuration.workingDirPath)
|
||||
set(EncryptServiceContext.KEY_BOT_CACHING_DIR, bot.configuration.actualCacheDir().absolutePath)
|
||||
}))
|
||||
|
@ -137,12 +137,7 @@ internal fun <R : Packet?> buildRawUniPacket(
|
||||
val signDataPacket = if (encryptWorker != null) {
|
||||
|
||||
val signResult = encryptWorker.qSecurityGetSign(
|
||||
EncryptServiceContext(client.uin, buildTypeSafeMap {
|
||||
set(EncryptServiceContext.KEY_APP_QUA, "V1_AND_SQ_8.9.58_4106_YYB_D") // 8.9.58
|
||||
set(EncryptServiceContext.KEY_CHANNEL_PROXY, createChannelProxy(client.bot))
|
||||
set(EncryptServiceContext.KEY_DEVICE_INFO, client.device)
|
||||
set(EncryptServiceContext.KEY_QIMEI36, client.qimei36 ?: "")
|
||||
}),
|
||||
EncryptServiceContext(client.uin),
|
||||
sequenceId,
|
||||
commandName,
|
||||
bodyBytes
|
||||
@ -376,12 +371,7 @@ internal fun BytePacketBuilder.writeSsoPacket(
|
||||
val reserveField = if (encryptWorker != null) {
|
||||
|
||||
val signResult = encryptWorker.qSecurityGetSign(
|
||||
EncryptServiceContext(client.uin, buildTypeSafeMap {
|
||||
set(EncryptServiceContext.KEY_APP_QUA, "V1_AND_SQ_8.9.58_4106_YYB_D") // 8.9.58
|
||||
set(EncryptServiceContext.KEY_CHANNEL_PROXY, createChannelProxy(client.bot))
|
||||
set(EncryptServiceContext.KEY_DEVICE_INFO, client.device)
|
||||
set(EncryptServiceContext.KEY_QIMEI36, client.qimei36 ?: "")
|
||||
}),
|
||||
EncryptServiceContext(client.uin),
|
||||
sequenceId,
|
||||
commandName,
|
||||
bodyBytes
|
||||
|
Loading…
Reference in New Issue
Block a user