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

Commit

Permalink
Shamrock: fix NT image acquisition
Browse files Browse the repository at this point in the history
  • Loading branch information
whitechi73 committed Feb 18, 2024
1 parent 14bf5fc commit b3a2e60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ internal sealed class MessageElemConverter: IMessageConvert {
"url" to when(chatType) {
MsgConstant.KCHATTYPEGROUP -> RichProtoSvc.getGroupVideoDownUrl("0", md5, video.fileUuid)
MsgConstant.KCHATTYPEC2C -> RichProtoSvc.getC2CVideoDownUrl("0", md5, video.fileUuid)
MsgConstant.KCHATTYPEGUILD -> RichProtoSvc.getGroupVideoDownUrl(peerId, md5, video.fileUuid)
MsgConstant.KCHATTYPEGUILD -> RichProtoSvc.getGroupVideoDownUrl("0", md5, video.fileUuid)
else -> unknownChatType(chatType)
}
).also {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,10 @@ internal object RichProtoSvc: BaseSvc() {
originalUrl: String,
md5: String,
): String {
val domain = if (originalUrl.startsWith("/download")) GPRO_PIC_NT else GPRO_PIC
val isNtServer = originalUrl.startsWith("/download")
val domain = if (isNtServer) GPRO_PIC_NT else GPRO_PIC
if (originalUrl.isNotEmpty()) {
if (!originalUrl.contains("rkey=")) {
if (isNtServer && !originalUrl.contains("rkey=")) {
return "https://$domain$originalUrl&rkey=$multiMediaRKey"
}
return "https://$domain$originalUrl"
Expand All @@ -191,9 +192,10 @@ internal object RichProtoSvc: BaseSvc() {
originalUrl: String,
md5: String
): String {
val domain = if (originalUrl.startsWith("/download")) GPRO_PIC_NT else GPRO_PIC
val isNtServer = originalUrl.startsWith("/download")
val domain = if (isNtServer) GPRO_PIC_NT else GPRO_PIC
if (originalUrl.isNotEmpty()) {
if (!originalUrl.contains("rkey=")) {
if (isNtServer && !originalUrl.contains("rkey=")) {
return "https://$domain$originalUrl&rkey=$multiMediaRKey"
}
return "https://$domain$originalUrl"
Expand Down

0 comments on commit b3a2e60

Please sign in to comment.