diff --git a/Lagrange.Core/Internal/Packets/Service/Oidb/Generics/OidbFriend.cs b/Lagrange.Core/Internal/Packets/Service/Oidb/Generics/OidbFriend.cs index b372026de..4b74b7302 100644 --- a/Lagrange.Core/Internal/Packets/Service/Oidb/Generics/OidbFriend.cs +++ b/Lagrange.Core/Internal/Packets/Service/Oidb/Generics/OidbFriend.cs @@ -10,5 +10,5 @@ internal class OidbFriend [ProtoMember(3)] public uint Uin { get; set; } - [ProtoMember(10001)] public OidbFriendAdditional Additional { get; set; } + [ProtoMember(10001)] public List Additional { get; set; } } \ No newline at end of file diff --git a/Lagrange.Core/Internal/Service/System/FetchFriendsService.cs b/Lagrange.Core/Internal/Service/System/FetchFriendsService.cs index b4f901051..2a11073e9 100644 --- a/Lagrange.Core/Internal/Service/System/FetchFriendsService.cs +++ b/Lagrange.Core/Internal/Service/System/FetchFriendsService.cs @@ -7,6 +7,7 @@ using Lagrange.Core.Internal.Packets.Service.Oidb.Request; using Lagrange.Core.Internal.Packets.Service.Oidb.Response; using Lagrange.Core.Utility.Binary; +using Lagrange.Core.Utility.Extension; using ProtoBuf; namespace Lagrange.Core.Internal.Service.System; @@ -50,7 +51,8 @@ protected override bool Parse(byte[] input, BotKeystore keystore, BotAppInfo app var friends = new List(); foreach (var raw in packet.Body.Friends) { - var properties = Property(raw.Additional.Layer1.Properties); + var additional = raw.Additional.First(x => x.Type == 1); + var properties = Property(additional.Layer1.Properties); friends.Add(new BotFriend(raw.Uin, raw.Uid, properties[20002], properties[103], properties[102])); }