Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
fix: #351
Browse files Browse the repository at this point in the history
  • Loading branch information
fuqiuluo committed Aug 4, 2024
1 parent 609e87d commit cdc9ca1
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,18 @@ internal object RichProtoSvc: QQInterfaces() {
): String {
val isNtServer = originalUrl.startsWith("/download")
if (isNtServer) {
val tmpRKey = NtV2RichMediaSvc.getTempNtRKey()
val tmpRKey = getTempNtRKey()
if (tmpRKey.isSuccess) {
val tmpRKeyRsp = tmpRKey.getOrThrow()
val tmpRKeyMap = hashMapOf<UInt, String>()
tmpRKeyRsp.rkeys?.forEach { rKeyInfo ->
tmpRKeyMap[rKeyInfo.type] = rKeyInfo.rkey
}
val rkey = tmpRKeyMap[when(chatType) {
MsgConstant.KCHATTYPEDISC, MsgConstant.KCHATTYPEGROUP -> 10u
MsgConstant.KCHATTYPEC2C -> 20u
MsgConstant.KCHATTYPEGUILD -> 10u
else -> 0u
MsgConstant.KCHATTYPEDISC, MsgConstant.KCHATTYPEGROUP -> 20u
MsgConstant.KCHATTYPEC2C -> 10u
MsgConstant.KCHATTYPEGUILD -> 20u
else -> 20u
}]
if (rkey != null) {
return "https://$MULTIMEDIA_DOMAIN$originalUrl$rkey"
Expand Down Expand Up @@ -242,7 +242,7 @@ internal object RichProtoSvc: QQInterfaces() {
tmpRKeyRsp.rkeys?.forEach { rKeyInfo ->
tmpRKeyMap[rKeyInfo.type] = rKeyInfo.rkey
}
val rkey = tmpRKeyMap[10u]
val rkey = tmpRKeyMap[20u]
if (rkey != null) {
return "https://$MULTIMEDIA_DOMAIN$originalUrl$rkey"
}
Expand Down Expand Up @@ -293,7 +293,7 @@ internal object RichProtoSvc: QQInterfaces() {
tmpRKeyRsp.rkeys?.forEach { rKeyInfo ->
tmpRKeyMap[rKeyInfo.type] = rKeyInfo.rkey
}
val rkey = tmpRKeyMap[20u]
val rkey = tmpRKeyMap[10u]
if (rkey != null) {
return "https://$MULTIMEDIA_DOMAIN$originalUrl$rkey"
}
Expand Down

0 comments on commit cdc9ca1

Please sign in to comment.