feat(onebot): TierB ① — get_group_signed_list via qun.qq.com web API

Group sign-in (打卡) list is NapCat's one kernel-free item here: it's a
plain HTTP POST to qun.qq.com/v2/signin/trpc/GetDaySignedList with g_tk
from p_skey, not OIDB. SnowLuma already has the cookie/bkn infra (same as
group notice/essence/honor), so this is a straight port — no RE.

- protocol/web/group-signin.ts: getDaySignedListWebAPI + pure
  mapDaySignedList (de-skews signInRank via (r-1)/2+1, [] when no page).
- core WebApi.getSignedList(groupId) wires the qun.qq.com cookie jar.
- onebot get_group_signed_list groupAction (readOnly), [] on no sign-ins.
- Tests pin the rank/field transform and the action wiring.
This commit is contained in:
DrSmoothl committed 2026-06-18 19:24:42 +08:00
1 parent dfb6aa54c7
commit 36d557e5ea
6 files changed
+183

No files matched your search

+10
View File
@@ -3,6 +3,7 @@ import { ForceFetchClientKey, type ClientKeyInfo as NamespaceClientKeyInfo } fro
import { GetPskey } from '@snowluma/protocol/oidb-services/web/get-pskey';
import { getGroupEssenceMsg, getGroupEssenceMsgAll, type GroupEssenceMsgRet } from '@snowluma/protocol/web/group-essence';
import { getHonorListWebAPI, WebHonorType, type WebHonorItem } from '@snowluma/protocol/web/group-honor';
import { getDaySignedListWebAPI, type SignedListMember } from '@snowluma/protocol/web/group-signin';
import {
deleteGroupNotice as deleteGroupNoticeHttp,
getGroupNoticeWebAPI,
@@ -227,6 +228,15 @@ export class WebApi {
return honorInfo;
}
// ─────────────── group sign-in (打卡) ───────────────
/** Today's group sign-in list via qun.qq.com. [] when none / on failure. */
async getSignedList(groupId: number): Promise<SignedListMember[]> {
const bridge = asBridge(this.ctx);
const cookieObject = await getCookies(bridge, 'qun.qq.com');
return getDaySignedListWebAPI(cookieObject, groupId.toString(), bridge.identity.uin.toString());
}
// ─────────────── group notice ───────────────
async sendNotice(