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

+17
View File
@@ -728,6 +728,23 @@ export const actions = [
},
}),
// get_group_signed_list — 群今日打卡名单。NapCat 走 qun.qq.com 的
// v2/signin/trpc/GetDaySignedList(HTTP + PSKey),非 OIDB;SnowLuma 复用
// 现有 web cookie/bkn 基建(与群公告/精华同套路),故无需 RE。失败/无打卡返回空表。
groupAction({
name: 'get_group_signed_list',
summary: '获取群今日打卡列表',
readOnly: true,
run: async (p, ctx) => {
try {
const list = await ctx.bridge.apis.web.getSignedList(p.group_id);
return okResponse(list);
} catch (e) {
return failedResponse(RETCODE.ACTION_FAILED, e instanceof Error ? e.message : String(e));
}
},
}),
defineAction({
name: 'forward_friend_single_msg',
summary: '转发单条消息给好友',