todo: retry get groups if groups length is 0

This commit is contained in:
linyuchen 2024-04-15 22:42:31 +08:00
parent 2f39a8d76e
commit fd54658e53

View File

@ -3,16 +3,18 @@ import { OB11Constructor } from '../../constructor';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { groups } from '@/common/data';
import {NTQQGroupApi} from "@/core/qqnt/apis";
class GetGroupList extends BaseAction<null, OB11Group[]> {
actionName = ActionName.GetGroupList;
protected async _handle(payload: null) {
// if (groups.length === 0) {
if (groups.size === 0) {
//todo: get groups
// const groups = await NTQQGroupApi.getGroups(true)
// log("get groups", groups)
// }
}
return OB11Constructor.groups(Array.from(groups.values()));
}
}