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

Commit

Permalink
Shamrock: 修复合并转发获取图片错误 #236
Browse files Browse the repository at this point in the history
  • Loading branch information
whitechi73 committed Feb 17, 2024
1 parent 3b210d7 commit 62385d6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,18 @@ internal sealed class MessageElemConverter: IMessageConvert {

//LogCenter.log(image.toString())

val originalUrl = image.originImageUrl ?: ""

LogCenter.log("receive image: $image", Level.DEBUG)

return MessageSegment(
type = "image",
data = hashMapOf(
"file" to md5,
"url" to when(chatType) {
MsgConstant.KCHATTYPEDISC, MsgConstant.KCHATTYPEGROUP -> RichProtoSvc.getGroupPicDownUrl(image.originImageUrl, md5)
MsgConstant.KCHATTYPEC2C -> RichProtoSvc.getC2CPicDownUrl(image.originImageUrl, md5)
MsgConstant.KCHATTYPEGUILD -> RichProtoSvc.getGuildPicDownUrl(image.originImageUrl, md5)
MsgConstant.KCHATTYPEDISC, MsgConstant.KCHATTYPEGROUP -> RichProtoSvc.getGroupPicDownUrl(originalUrl, md5)
MsgConstant.KCHATTYPEC2C -> RichProtoSvc.getC2CPicDownUrl(originalUrl, md5)
MsgConstant.KCHATTYPEGUILD -> RichProtoSvc.getGuildPicDownUrl(originalUrl, md5)
else -> unknownChatType(chatType)
},
"subType" to image.picSubType,
Expand Down

0 comments on commit 62385d6

Please sign in to comment.