mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-13 00:10:27 +00:00
build: 1.3.5-beta33
This commit is contained in:
@@ -11,7 +11,7 @@ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
const SchemaData = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
no_cache: { type: 'boolean' },
|
||||
no_cache: { type: ['boolean', 'string'] },
|
||||
}
|
||||
} as const satisfies JSONSchema;
|
||||
|
||||
@@ -22,7 +22,7 @@ class GetGroupList extends BaseAction<Payload, OB11Group[]> {
|
||||
PayloadSchema = SchemaData;
|
||||
protected async _handle(payload: Payload) {
|
||||
let groupList: Group[] = Array.from(groups.values());
|
||||
if (groupList.length === 0 || payload?.no_cache === true /*|| payload.no_cache === 'true'*/) {
|
||||
if (groupList.length === 0 || payload?.no_cache === true || payload.no_cache === 'true') {
|
||||
groupList = await NTQQGroupApi.getGroups(true);
|
||||
// log('get groups', groups);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ const SchemaData = {
|
||||
properties: {
|
||||
group_id: { type: 'number' },
|
||||
user_id: { type: 'number' },
|
||||
no_cache: { type: 'boolean' },
|
||||
no_cache: { type: ['boolean', 'string'] },
|
||||
},
|
||||
required: ['group_id', 'user_id']
|
||||
} as const satisfies JSONSchema;
|
||||
|
||||
@@ -11,7 +11,7 @@ const SchemaData = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
group_id: { type: 'number' },
|
||||
no_cache: { type: 'boolean' },
|
||||
no_cache: { type: ['boolean', 'string'] },
|
||||
},
|
||||
required: ['group_id', 'user_id']
|
||||
} as const satisfies JSONSchema;
|
||||
@@ -28,7 +28,7 @@ class GetGroupMemberList extends BaseAction<Payload, OB11GroupMember[]> {
|
||||
if (!group) {
|
||||
throw (`群${payload.group_id}不存在`);
|
||||
}
|
||||
if (payload.no_cache == true /*|| payload.no_cache === 'true'*/) {
|
||||
if (payload.no_cache == true || payload.no_cache === 'true') {
|
||||
// webGroupMembers = await WebApi.getGroupMembers(payload.group_id.toString());
|
||||
const _groupMembers = await NTQQGroupApi.getGroupMembers(payload.group_id.toString());
|
||||
groupMembers.set(group.groupCode, _groupMembers);
|
||||
|
||||
Reference in New Issue
Block a user