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

+4
View File
@@ -44,6 +44,10 @@
"types": "./src/get-c2c-msg.ts",
"default": "./src/get-c2c-msg.ts"
},
"./qidian-corp": {
"types": "./src/qidian-corp.ts",
"default": "./src/qidian-corp.ts"
},
"./notify": {
"types": "./src/notify.ts",
"default": "./src/notify.ts"
+18
View File
@@ -0,0 +1,18 @@
import type { pb, uint_32 } from '@snowluma/proton';
// trpc.basic.corp.Datacard.SsoCorpInfo — 企点企业资料卡信息。
// 请求:field1 = 目标账号 UIN(varint)。
// 响应字段为企点企业资料卡:名称 / 简介 / 官网 / 企业签名 / 地址 / 电话 / 邮箱。
export interface QidianCorpInfoRequest {
uin?: pb<1, uint_32>;
}
export interface QidianCorpInfoResponse {
corpName?: pb<2, string>;
intro?: pb<3, string>;
website?: pb<4, string>;
slogan?: pb<5, string>;
address?: pb<6, string>;
phone?: pb<7, string>;
email?: pb<8, string>;
}