diff --git a/client/pb/cmd0x346/cmd0x346.pb.go b/client/pb/cmd0x346/cmd0x346.pb.go index 12056553..93793d1e 100644 --- a/client/pb/cmd0x346/cmd0x346.pb.go +++ b/client/pb/cmd0x346/cmd0x346.pb.go @@ -447,7 +447,7 @@ type C346ReqBody struct { ClientType int32 `protobuf:"varint,102,opt"` FlagSupportMediaplatform uint32 `protobuf:"varint,200,opt"` ApplyCopyToReq *ApplyCopyToReq `protobuf:"bytes,90000,opt"` - //ApplyCleanTrafficReq applyCleanTrafficReq = 90001; empty message + // ApplyCleanTrafficReq applyCleanTrafficReq = 90001; empty message ApplyGetTrafficReq *ApplyGetTrafficReq `protobuf:"bytes,90002,opt"` ExtensionReq *ExtensionReq `protobuf:"bytes,99999,opt"` _ [0]func() diff --git a/client/pb/data.pb.go b/client/pb/data.pb.go index 761f6ddc..f3bc5051 100644 --- a/client/pb/data.pb.go +++ b/client/pb/data.pb.go @@ -213,8 +213,8 @@ type GroupMemberInfo struct { Lev []byte `protobuf:"bytes,13,opt"` Join int64 `protobuf:"varint,14,opt"` LastSpeak int64 `protobuf:"varint,15,opt"` - //repeated CustomEntry customEnties = 16; - //repeated GBarInfo gbarConcerned = 17; + // repeated CustomEntry customEnties = 16; + // repeated GBarInfo gbarConcerned = 17; GbarTitle []byte `protobuf:"bytes,18,opt"` GbarUrl []byte `protobuf:"bytes,19,opt"` GbarCnt int32 `protobuf:"varint,20,opt"` @@ -230,8 +230,8 @@ type GroupMemberInfo struct { ConcernType int32 `protobuf:"varint,30,opt"` SpecialTitle []byte `protobuf:"bytes,31,opt"` SpecialTitleExpireTime int32 `protobuf:"varint,32,opt"` - //FlowersEntry flowerEntry = 33; - //TeamEntry teamEntry = 34; + // FlowersEntry flowerEntry = 33; + // TeamEntry teamEntry = 34; PhoneNum []byte `protobuf:"bytes,35,opt"` Job []byte `protobuf:"bytes,36,opt"` MedalId int32 `protobuf:"varint,37,opt"` diff --git a/client/pb/msg/msg.pb.go b/client/pb/msg/msg.pb.go index d38b530e..1a74e438 100644 --- a/client/pb/msg/msg.pb.go +++ b/client/pb/msg/msg.pb.go @@ -37,13 +37,13 @@ type SendMessageRequest struct { MsgSeq proto.Option[int32] `protobuf:"varint,4,opt"` MsgRand proto.Option[int32] `protobuf:"varint,5,opt"` SyncCookie []byte `protobuf:"bytes,6,opt"` - //MsgComm.AppShareInfo? appShare = 7; + // MsgComm.AppShareInfo? appShare = 7; MsgVia proto.Option[int32] `protobuf:"varint,8,opt"` DataStatist proto.Option[int32] `protobuf:"varint,9,opt"` - //MultiMsgAssist? multiMsgAssist = 10; - //PbInputNotifyInfo? inputNotifyInfo = 11; + // MultiMsgAssist? multiMsgAssist = 10; + // PbInputNotifyInfo? inputNotifyInfo = 11; MsgCtrl *MsgCtrl `protobuf:"bytes,12,opt"` - //ImReceipt.ReceiptReq? receiptReq = 13; + // ImReceipt.ReceiptReq? receiptReq = 13; MultiSendSeq proto.Option[int32] `protobuf:"varint,14,opt"` } @@ -208,52 +208,52 @@ type Elem struct { NotOnlineImage *NotOnlineImage `protobuf:"bytes,4,opt"` TransElemInfo *TransElem `protobuf:"bytes,5,opt"` MarketFace *MarketFace `protobuf:"bytes,6,opt"` - //ElemFlags elemFlags = 7; + // ElemFlags elemFlags = 7; CustomFace *CustomFace `protobuf:"bytes,8,opt"` ElemFlags2 *ElemFlags2 `protobuf:"bytes,9,opt"` - //FunFace funFace = 10; - //SecretFileMsg secretFile = 11; + // FunFace funFace = 10; + // SecretFileMsg secretFile = 11; RichMsg *RichMsg `protobuf:"bytes,12,opt"` GroupFile *GroupFile `protobuf:"bytes,13,opt"` - //PubGroup pubGroup = 14; - //MarketTrans marketTrans = 15; + // PubGroup pubGroup = 14; + // MarketTrans marketTrans = 15; ExtraInfo *ExtraInfo `protobuf:"bytes,16,opt"` - //ShakeWindow? shakeWindow = 17; - //PubAccount? pubAccount = 18; + // ShakeWindow? shakeWindow = 17; + // PubAccount? pubAccount = 18; VideoFile *VideoFile `protobuf:"bytes,19,opt"` - //TipsInfo? tipsInfo = 20; + // TipsInfo? tipsInfo = 20; AnonGroupMsg *AnonymousGroupMessage `protobuf:"bytes,21,opt"` - //QQLiveOld? qqLiveOld = 22; - //LifeOnlineAccount? lifeOnline = 23; + // QQLiveOld? qqLiveOld = 22; + // LifeOnlineAccount? lifeOnline = 23; QQWalletMsg *QQWalletMsg `protobuf:"bytes,24,opt"` - //CrmElem? crmElem = 25; - //ConferenceTipsInfo? conferenceTipsInfo = 26; - //RedBagInfo? redbagInfo = 27; - //LowVersionTips? lowVersionTips = 28; - //bytes bankcodeCtrlInfo = 29; - //NearByMessageType? nearByMsg = 30; + // CrmElem? crmElem = 25; + // ConferenceTipsInfo? conferenceTipsInfo = 26; + // RedBagInfo? redbagInfo = 27; + // LowVersionTips? lowVersionTips = 28; + // bytes bankcodeCtrlInfo = 29; + // NearByMessageType? nearByMsg = 30; CustomElem *CustomElem `protobuf:"bytes,31,opt"` - //LocationInfo? locationInfo = 32; - //PubAccInfo? pubAccInfo = 33; - //SmallEmoji? smallEmoji = 34; - //FSJMessageElem? fsjMsgElem = 35; - //ArkAppElem? arkApp = 36; + // LocationInfo? locationInfo = 32; + // PubAccInfo? pubAccInfo = 33; + // SmallEmoji? smallEmoji = 34; + // FSJMessageElem? fsjMsgElem = 35; + // ArkAppElem? arkApp = 36; GeneralFlags *GeneralFlags `protobuf:"bytes,37,opt"` - //CustomFace? hcFlashPic = 38; - //DeliverGiftMsg? deliverGiftMsg = 39; - //BitAppMsg? bitappMsg = 40; - //OpenQQData? openQqData = 41; - //ApolloActMsg? apolloMsg = 42; - //GroupPubAccountInfo? groupPubAccInfo = 43; - //BlessingMessage? blessMsg = 44; + // CustomFace? hcFlashPic = 38; + // DeliverGiftMsg? deliverGiftMsg = 39; + // BitAppMsg? bitappMsg = 40; + // OpenQQData? openQqData = 41; + // ApolloActMsg? apolloMsg = 42; + // GroupPubAccountInfo? groupPubAccInfo = 43; + // BlessingMessage? blessMsg = 44; SrcMsg *SourceMsg `protobuf:"bytes,45,opt"` - //LolaMsg? lolaMsg = 46; - //GroupBusinessMsg? groupBusinessMsg = 47; - //WorkflowNotifyMsg? msgWorkflowNotify = 48; - //PatsElem? patElem = 49; - //GroupPostElem? groupPostElem = 50; + // LolaMsg? lolaMsg = 46; + // GroupBusinessMsg? groupBusinessMsg = 47; + // WorkflowNotifyMsg? msgWorkflowNotify = 48; + // PatsElem? patElem = 49; + // GroupPostElem? groupPostElem = 50; LightApp *LightAppElem `protobuf:"bytes,51,opt"` - //EIMInfo? eimInfo = 52; + // EIMInfo? eimInfo = 52; CommonElem *CommonElem `protobuf:"bytes,53,opt"` _ [0]func() } @@ -431,32 +431,32 @@ type OnlineImage struct { } type NotOnlineImage struct { - FilePath proto.Option[string] `protobuf:"bytes,1,opt"` - FileLen proto.Option[int32] `protobuf:"varint,2,opt"` - DownloadPath proto.Option[string] `protobuf:"bytes,3,opt"` - OldVerSendFile []byte `protobuf:"bytes,4,opt"` - ImgType proto.Option[int32] `protobuf:"varint,5,opt"` - PreviewsImage []byte `protobuf:"bytes,6,opt"` - PicMd5 []byte `protobuf:"bytes,7,opt"` - PicHeight proto.Option[int32] `protobuf:"varint,8,opt"` - PicWidth proto.Option[int32] `protobuf:"varint,9,opt"` - ResId proto.Option[string] `protobuf:"bytes,10,opt"` - Flag []byte `protobuf:"bytes,11,opt"` - ThumbUrl proto.Option[string] `protobuf:"bytes,12,opt"` - Original proto.Option[int32] `protobuf:"varint,13,opt"` - BigUrl proto.Option[string] `protobuf:"bytes,14,opt"` - OrigUrl proto.Option[string] `protobuf:"bytes,15,opt"` - BizType proto.Option[int32] `protobuf:"varint,16,opt"` - Result proto.Option[int32] `protobuf:"varint,17,opt"` - Index proto.Option[int32] `protobuf:"varint,18,opt"` - OpFaceBuf []byte `protobuf:"bytes,19,opt"` - OldPicMd5 proto.Option[bool] `protobuf:"varint,20,opt"` - ThumbWidth proto.Option[int32] `protobuf:"varint,21,opt"` - ThumbHeight proto.Option[int32] `protobuf:"varint,22,opt"` - FileId proto.Option[int32] `protobuf:"varint,23,opt"` - ShowLen proto.Option[int32] `protobuf:"varint,24,opt"` - DownloadLen proto.Option[int32] `protobuf:"varint,25,opt"` - PbReserve []byte `protobuf:"bytes,29,opt"` + FilePath proto.Option[string] `protobuf:"bytes,1,opt"` + FileLen proto.Option[int32] `protobuf:"varint,2,opt"` + DownloadPath proto.Option[string] `protobuf:"bytes,3,opt"` + OldVerSendFile []byte `protobuf:"bytes,4,opt"` + ImgType proto.Option[int32] `protobuf:"varint,5,opt"` + PreviewsImage []byte `protobuf:"bytes,6,opt"` + PicMd5 []byte `protobuf:"bytes,7,opt"` + PicHeight proto.Option[int32] `protobuf:"varint,8,opt"` + PicWidth proto.Option[int32] `protobuf:"varint,9,opt"` + ResId proto.Option[string] `protobuf:"bytes,10,opt"` + Flag []byte `protobuf:"bytes,11,opt"` + ThumbUrl proto.Option[string] `protobuf:"bytes,12,opt"` + Original proto.Option[int32] `protobuf:"varint,13,opt"` + BigUrl proto.Option[string] `protobuf:"bytes,14,opt"` + OrigUrl proto.Option[string] `protobuf:"bytes,15,opt"` + BizType proto.Option[int32] `protobuf:"varint,16,opt"` + Result proto.Option[int32] `protobuf:"varint,17,opt"` + Index proto.Option[int32] `protobuf:"varint,18,opt"` + OpFaceBuf []byte `protobuf:"bytes,19,opt"` + OldPicMd5 proto.Option[bool] `protobuf:"varint,20,opt"` + ThumbWidth proto.Option[int32] `protobuf:"varint,21,opt"` + ThumbHeight proto.Option[int32] `protobuf:"varint,22,opt"` + FileId proto.Option[int32] `protobuf:"varint,23,opt"` + ShowLen proto.Option[int32] `protobuf:"varint,24,opt"` + DownloadLen proto.Option[int32] `protobuf:"varint,25,opt"` + PbReserve *NotOnlineImage_PbReserve `protobuf:"bytes,29,opt"` } type NotOnlineFile struct { @@ -886,3 +886,9 @@ type ElemFlags2_Inst struct { InstId proto.Option[uint32] `protobuf:"varint,2,opt"` _ [0]func() } + +// TODO: find this message +type NotOnlineImage_PbReserve struct { + Url proto.Option[string] `protobuf:"bytes,30,opt"` + _ [0]func() +} diff --git a/client/pb/msg/msg.proto b/client/pb/msg/msg.proto index b84cc83b..7341d843 100644 --- a/client/pb/msg/msg.proto +++ b/client/pb/msg/msg.proto @@ -455,7 +455,12 @@ message NotOnlineImage { optional int32 fileId = 23; optional int32 showLen = 24; optional int32 downloadLen = 25; - optional bytes pbReserve = 29; + + // TODO: find this message + message PbReserve { + optional string url = 30; + } + optional PbReserve pbReserve = 29; } message NotOnlineFile { diff --git a/client/pb/oidb/oidb0x6d9.pb.go b/client/pb/oidb/oidb0x6d9.pb.go index 65c1848d..07d47d63 100644 --- a/client/pb/oidb/oidb0x6d9.pb.go +++ b/client/pb/oidb/oidb0x6d9.pb.go @@ -73,7 +73,7 @@ type FeedsRspBody struct { RetCode proto.Option[int32] `protobuf:"varint,1,opt"` RetMsg proto.Option[string] `protobuf:"bytes,2,opt"` ClientWording proto.Option[string] `protobuf:"bytes,3,opt"` - //repeated C8639group_file_common.FeedsResult feedsResultList = 4; + // repeated C8639group_file_common.FeedsResult feedsResultList = 4; SvrbusyWaitTime proto.Option[uint32] `protobuf:"varint,5,opt"` _ [0]func() } diff --git a/client/pb/oidb/oidb0xD79.pb.go b/client/pb/oidb/oidb0xD79.pb.go index b6910f14..def894eb 100644 --- a/client/pb/oidb/oidb0xD79.pb.go +++ b/client/pb/oidb/oidb0xD79.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-golite. DO NOT EDIT. -// source: pb/oidb/oidb0xd79.proto +// source: pb/oidb/oidb0xD79.proto package oidb diff --git a/client/pb/oidb/oidb0xeac.pb.go b/client/pb/oidb/oidb0xeac.pb.go index 81213c53..e4df582e 100644 --- a/client/pb/oidb/oidb0xeac.pb.go +++ b/client/pb/oidb/oidb0xeac.pb.go @@ -18,7 +18,7 @@ type EACRspBody struct { Wording proto.Option[string] `protobuf:"bytes,1,opt"` DigestUin proto.Option[uint64] `protobuf:"varint,2,opt"` DigestTime proto.Option[uint32] `protobuf:"varint,3,opt"` - //optional DigestMsg msg = 4; + // optional DigestMsg msg = 4; ErrorCode proto.Option[uint32] `protobuf:"varint,10,opt"` _ [0]func() } diff --git a/client/pb/profilecard/accountsearch.pb.go b/client/pb/profilecard/accountsearch.pb.go index 2570564a..954bd856 100644 --- a/client/pb/profilecard/accountsearch.pb.go +++ b/client/pb/profilecard/accountsearch.pb.go @@ -67,7 +67,7 @@ type AccountSearchRecord struct { ArticleCreateTime proto.Option[string] `protobuf:"bytes,25,opt"` ArticleAuthor proto.Option[string] `protobuf:"bytes,26,opt"` AccountId proto.Option[uint64] `protobuf:"varint,27,opt"` - //repeated Label groupLabels = 30; + // repeated Label groupLabels = 30; VideoAccount proto.Option[uint32] `protobuf:"varint,31,opt"` VideoArticle proto.Option[uint32] `protobuf:"varint,32,opt"` UinPrivilege proto.Option[int32] `protobuf:"varint,33,opt"` @@ -87,7 +87,7 @@ type AccountSearch struct { UserLocation *Location `protobuf:"bytes,10,opt"` LocationGroup proto.Option[bool] `protobuf:"varint,11,opt"` Filtertype proto.Option[int32] `protobuf:"varint,12,opt"` - //repeated C33304record recommendList = 13; + // repeated C33304record recommendList = 13; HotwordRecord *Hotwordrecord `protobuf:"bytes,14,opt"` ArticleMoreUrl proto.Option[string] `protobuf:"bytes,15,opt"` ResultItems []*ResultItem `protobuf:"bytes,16,rep"` diff --git a/client/pb/qweb/app.pb.go b/client/pb/qweb/app.pb.go index 937785dd..4aa97528 100644 --- a/client/pb/qweb/app.pb.go +++ b/client/pb/qweb/app.pb.go @@ -4,7 +4,7 @@ package qweb type GetAppInfoByIdReq struct { - //CommonExt ExtInfo = 1; + // CommonExt ExtInfo = 1; AppId string `protobuf:"bytes,2,opt"` NeedVersionInfo int32 `protobuf:"varint,3,opt"` _ [0]func() diff --git a/message/image.go b/message/image.go index 6f265bf5..5d03744d 100644 --- a/message/image.go +++ b/message/image.go @@ -153,7 +153,6 @@ func (e *FriendImageElement) Pack() []*msg.Elem { PicMd5: e.Md5, DownloadPath: proto.Some(e.ImageId), Original: proto.Int32(1), - PbReserve: []byte{0x78, 0x02}, } if e.Flash { diff --git a/message/message.go b/message/message.go index 6b29b246..cbfdebf4 100644 --- a/message/message.go +++ b/message/message.go @@ -514,25 +514,31 @@ func ParseMessageElems(elems []*msg.Elem) []IMessageElement { return []IMessageElement{face} } if elem.NotOnlineImage != nil { - var img string - if elem.NotOnlineImage.OrigUrl.Unwrap() != "" { - img = "https://c2cpicdw.qpic.cn" + elem.NotOnlineImage.OrigUrl.Unwrap() - } else { - img = "https://c2cpicdw.qpic.cn/offpic_new/0" - downloadPath := elem.NotOnlineImage.ResId.Unwrap() - if elem.NotOnlineImage.DownloadPath.Unwrap() != "" { - downloadPath = elem.NotOnlineImage.DownloadPath.Unwrap() + img := elem.NotOnlineImage + + var url string + switch { + case img.PbReserve != nil && img.PbReserve.Url.Unwrap() != "": + url = fmt.Sprintf("https://c2cpicdw.qpic.cn%s&spec=0&rf=naio", img.PbReserve.Url.Unwrap()) + case img.OrigUrl.Unwrap() != "": + url = "https://c2cpicdw.qpic.cn" + img.OrigUrl.Unwrap() + default: + url = "https://c2cpicdw.qpic.cn/offpic_new/0" + downloadPath := img.ResId.Unwrap() + if img.DownloadPath.Unwrap() != "" { + downloadPath = img.DownloadPath.Unwrap() } if !strings.HasPrefix(downloadPath, "/") { - img += "/" + url += "/" } - img += downloadPath + "/0?term=3" + url += downloadPath + "/0?term=3" } + res = append(res, &FriendImageElement{ - ImageId: elem.NotOnlineImage.FilePath.Unwrap(), - Size: elem.NotOnlineImage.FileLen.Unwrap(), - Url: img, - Md5: elem.NotOnlineImage.PicMd5, + ImageId: img.FilePath.Unwrap(), + Size: img.FileLen.Unwrap(), + Url: url, + Md5: img.PicMd5, }) } if elem.QQWalletMsg != nil && elem.QQWalletMsg.AioBody != nil {