feat(onebot): expose group-wide mute status
Report whether group-wide mute is enabled through the existing group list and group information responses. Keep standard and extended queries aligned, support explicit refreshes in the SDK, and update the generated action documentation without adding another endpoint. Preserve established compatibility values, isolate cached non-member results by account, and add coverage across the request, mapping, action, and client layers. Closes #313
This commit is contained in:
18 files changed
+687
-56
No files matched your search
@@ -7,6 +7,23 @@ import {
|
||||
} from '../src';
|
||||
|
||||
describe('SnowLumaHttpClient', () => {
|
||||
it('maps extended group-info refresh options to OneBot field names', async () => {
|
||||
const fetchImpl = vi.fn().mockImplementation(async () => new Response(JSON.stringify({
|
||||
status: 'ok',
|
||||
retcode: 0,
|
||||
data: null,
|
||||
})));
|
||||
const client = new SnowLumaHttpClient({ fetch: fetchImpl });
|
||||
|
||||
await client.getGroupInfoEx(123456, { noCache: true });
|
||||
await client.getGroupDetailInfo(123456, { noCache: true });
|
||||
|
||||
expect(fetchImpl.mock.calls.map((call) => JSON.parse((call[1] as RequestInit).body as string))).toEqual([
|
||||
{ action: 'get_group_info_ex', params: { group_id: 123456, no_cache: true } },
|
||||
{ action: 'get_group_detail_info', params: { group_id: 123456, no_cache: true } },
|
||||
]);
|
||||
});
|
||||
|
||||
it('maps system-face catalog helpers to their OneBot actions', async () => {
|
||||
const fetchImpl = vi.fn().mockImplementation(async () => new Response(JSON.stringify({
|
||||
status: 'ok',
|
||||
|
||||
Reference in new issue
Block a user