feat(profile): surface QQ level from OIDB 0xFE1_2 number-property 105
`fetchUserProfile` already requested key 105 in the keys[] array but the decode pass never read it, so callers got nothing. NapCat exposes the same value as `qq_level` on `get_stranger_info`; users coming from NapCat noticed the field was missing on the SnowLuma side. Cross-checked against LagrangeV2 Internal/Services/System/ FetchStrangerService.cs which explicitly labels key 105 = Level and uses `numbers[105]` directly. Changes: - UserProfileInfo: add `level: number`. - fetchUserProfile decode: `info.level = numMap.get(105) ?? 0`. - getStrangerInfo: emit both `qq_level` (NapCat-compat) and `level`. - Test/manager call sites updated for the new required field.
This commit is contained in:
5 files changed
+16
-3
No files matched your search
@@ -188,7 +188,7 @@ describe('IdentityService', () => {
|
||||
|
||||
describe('IdentityService.resolveUid', () => {
|
||||
function makeProfile(uin: number, uid: string): UserProfileInfo {
|
||||
return { uin, uid, nickname: '', remark: '', qid: '', sex: 'unknown', age: 0, sign: '', avatar: '' };
|
||||
return { uin, uid, nickname: '', remark: '', qid: '', sex: 'unknown', age: 0, sign: '', avatar: '', level: 0 };
|
||||
}
|
||||
|
||||
it('returns the cached uid without invoking the fetcher', async () => {
|
||||
|
||||
Reference in new issue
Block a user