Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Commit 7cbe771

Browse files
authored
[Core] Added Remark in FetchUserInfo. (#805)
1 parent 946f845 commit 7cbe771

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Lagrange.Core/Common/Entity/BotUserInfo.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ namespace Lagrange.Core.Common.Entity;
33
[Serializable]
44
public class BotUserInfo
55
{
6-
internal BotUserInfo(uint uin, string nickname, string avatar, DateTime birthday, string city, string country, string school, uint age, DateTime registerTime, GenderInfo gender, string? qid, uint level, string sign, BotStatus status, List<BusinessCustom> business)
6+
internal BotUserInfo(uint uin, string nickname, string? remark, string avatar, DateTime birthday, string city, string country, string school, uint age, DateTime registerTime, GenderInfo gender, string? qid, uint level, string sign, BotStatus status, List<BusinessCustom> business)
77
{
88
Uin = uin;
99
Avatar = avatar;
1010
// Avatar = $"https://q1.qlogo.cn/g?b=qq&nk={Uin}&s=640";
1111
Nickname = nickname;
12+
Remark = remark;
1213
Birthday = birthday;
1314
City = city;
1415
Country = country;
@@ -29,6 +30,8 @@ internal BotUserInfo(uint uin, string nickname, string avatar, DateTime birthday
2930

3031
public string Nickname { get; set; }
3132

33+
public string? Remark { get; set; }
34+
3235
public DateTime Birthday { get; set; }
3336

3437
public string City { get; set; }

Lagrange.Core/Internal/Service/System/FetchUserInfoService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ protected override bool Parse(Span<byte> input, BotKeystore keystore, BotAppInfo
9292
var reg = DateTime.UnixEpoch.AddSeconds(numberProperties[20026]);
9393

9494
string? qid = Encoding.UTF8.GetString(bytesProperties[27394]);
95+
string? remark = Encoding.UTF8.GetString(bytesProperties[103]);
9596

9697
uint statusId = numberProperties[27372];
9798
uint mask = 268435455 - statusId;
@@ -125,6 +126,7 @@ protected override bool Parse(Span<byte> input, BotKeystore keystore, BotAppInfo
125126
var info = new BotUserInfo(
126127
payload.Body.Body.Uin,
127128
nickname,
129+
remark,
128130
$"{avatars.Url}640",
129131
birthday,
130132
city,

0 commit comments

Comments
 (0)