From 185f167c5f485b1023b94b22719e9e186e612e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 21 Jun 2024 11:21:09 +0800 Subject: [PATCH] build: 1.5.9 - refactor cache --- src/onebot11/action/group/GetGroupList.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/onebot11/action/group/GetGroupList.ts b/src/onebot11/action/group/GetGroupList.ts index 246447bc..64c1a535 100644 --- a/src/onebot11/action/group/GetGroupList.ts +++ b/src/onebot11/action/group/GetGroupList.ts @@ -2,7 +2,6 @@ import { OB11Group } from '../../types'; import { OB11Constructor } from '../../constructor'; import BaseAction from '../BaseAction'; import { ActionName } from '../types'; -import { groups } from '@/core/data'; import { NTQQGroupApi } from '@/core/apis'; import { Group } from '@/core/entities'; import { log } from '@/common/utils/log'; @@ -21,7 +20,7 @@ class GetGroupList extends BaseAction { actionName = ActionName.GetGroupList; PayloadSchema = SchemaData; protected async _handle(payload: Payload) { - let groupList: Group[] = Array.from(groups.values()); + let groupList: Group[] = await NTQQGroupApi.getGroups(); if (groupList.length === 0 || payload?.no_cache === true || payload.no_cache === 'true') { groupList = await NTQQGroupApi.getGroups(true); // log('get groups', groups);