feat(onebot): expose friend dress queries (#277)
Add a read-only action for querying QQ profile decorations from the authenticated web page. Validate and classify page responses, expose structured errors, and cover parsing with a sanitized fixture.
This commit is contained in:
1 parent
679756d1a7
commit
3517257aa6
8 files changed
+865
-5
No files matched your search
@@ -2,6 +2,7 @@ import { loadBinarySource } from '@snowluma/protocol/highway/utils';
|
||||
import { ForceFetchClientKey, type ClientKeyInfo as NamespaceClientKeyInfo } from '@snowluma/protocol/oidb-services/web/force-fetch-client-key';
|
||||
import { GetPskey } from '@snowluma/protocol/oidb-services/web/get-pskey';
|
||||
import { getGroupEssenceMsg, getGroupEssenceMsgAll, type GroupEssenceMsgRet } from '@snowluma/protocol/web/group-essence';
|
||||
import { getFriendDressWebAPI, type WebFriendDress } from '@snowluma/protocol/web/friend-dress';
|
||||
import { getHonorListWebAPI, WebHonorType, type WebHonorItem } from '@snowluma/protocol/web/group-honor';
|
||||
import { getDaySignedListWebAPI, type SignedListMember } from '@snowluma/protocol/web/group-signin';
|
||||
import {
|
||||
@@ -417,4 +418,15 @@ export class WebApi {
|
||||
const cookieObject = await getCookies(bridge, 'qun.qq.com');
|
||||
return await deleteGroupNoticeHttp(cookieObject, groupCode, fid);
|
||||
}
|
||||
|
||||
// ─────────────── friend dress (好友装扮) ───────────────
|
||||
|
||||
/** 查某人正在用的好友装扮(挂件/名片/来电/输入状态等)。走 vip.qq.com 域,
|
||||
* 纯 cookie 鉴权、抓 SSR HTML。「查到但没装扮」返回空 items;网络/未登录态/
|
||||
* 风控/页面改版/串号数据抛 FriendDressError(kind 区分具体环节)。 */
|
||||
async getFriendDress(targetUin: number): Promise<WebFriendDress> {
|
||||
const bridge = asBridge(this.ctx);
|
||||
const cookieObject = await getCookies(bridge, 'vip.qq.com');
|
||||
return getFriendDressWebAPI(cookieObject, targetUin.toString());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user