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],