Skip to content

Commit

Permalink
[Core] Fix group Oidb definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan authored and Linwenxuan committed Oct 24, 2023
1 parent a9a554d commit d8d0456
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<OidbFriendAdditional> Additional { get; set; }
}
4 changes: 3 additions & 1 deletion Lagrange.Core/Internal/Service/System/FetchFriendsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -50,7 +51,8 @@ protected override bool Parse(byte[] input, BotKeystore keystore, BotAppInfo app
var friends = new List<BotFriend>();
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]));
}

Expand Down

0 comments on commit d8d0456

Please sign in to comment.