feat(onebot): expose qidian enterprise name on stranger info

When a stranger is a qidian account, attach the enterprise name from the corp data card. Non-qidian accounts keep an empty name.

Refs #404
This commit is contained in:
makotowu authored and GitHub committed 2026-08-26 23:31:15 +08:00
1 parent e1bb9b4722
commit c1a0091143
15 files changed
+238 -10

No files matched your search

@@ -53,7 +53,7 @@ describe('FetchUserProfileByUid namespace (UID form)', () => {
it('decodes qidian flags from number-properties (0 when absent)', async () => {
const qidian = makeSender({
body: {
uin: 3004251964, uid: 'u',
uin: 10002, uid: 'u',
properties: {
bytesProperties: [],
numberProperties: [
@@ -52,7 +52,7 @@ describe('FetchUserProfile namespace', () => {
// 企点员工号:两个标志均为 1;普通账号服务器不返回这两个 key → 缺省 0
const qidian = makeSender({
body: {
uin: 3004251964, uid: 'u',
uin: 10002, uid: 'u',
properties: {
bytesProperties: [],
numberProperties: [
@@ -62,7 +62,7 @@ describe('FetchUserProfile namespace', () => {
},
} as any,
});
const out = await FetchUserProfile.invoke(qidian, { uin: 3004251964 });
const out = await FetchUserProfile.invoke(qidian, { uin: 10002 });
expect(out.qidianMasterFlag).toBe(1);
expect(out.qidianCrewFlag).toBe(1);
expect(out.qidianCrewFlag2).toBe(0);