From 17c168db5f75f87621f2398b79cd11a6980076ec Mon Sep 17 00:00:00 2001 From: Redmomn <109732988+Redmomn@users.noreply.github.com> Date: Wed, 27 Nov 2024 19:07:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=B4=E5=83=8F=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/packets/oidb/fetch_user_info.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/packets/oidb/fetch_user_info.go b/client/packets/oidb/fetch_user_info.go index e80c5fb..a6bad7d 100644 --- a/client/packets/oidb/fetch_user_info.go +++ b/client/packets/oidb/fetch_user_info.go @@ -1,6 +1,8 @@ package oidb import ( + "fmt" + "github.com/LagrangeDev/LagrangeGo/client/entity" "github.com/LagrangeDev/LagrangeGo/client/packets/pb/service/oidb" "github.com/LagrangeDev/LagrangeGo/internal/proto" @@ -79,10 +81,13 @@ func ParseFetchUserInfoResp(data []byte) (*entity.User, error) { var business oidb.Business _ = proto.Unmarshal(utils.S2B(stringProperties[107]), &business) + var avatar oidb.Avatar + _ = proto.Unmarshal(utils.S2B(stringProperties[101]), &avatar) + return &entity.User{ Uin: resp.Body.Uin, //UID: resp.Body.UID, - Avatar: stringProperties[101], + Avatar: fmt.Sprintf("%s640", avatar.URL.Unwrap()), QID: stringProperties[27394], Nickname: stringProperties[20002], PersonalSign: stringProperties[102],