mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
todo: retry get groups if groups length is 0
This commit is contained in:
@@ -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) {
|
||||
// const groups = await NTQQGroupApi.getGroups(true)
|
||||
// log("get groups", groups)
|
||||
// }
|
||||
if (groups.size === 0) {
|
||||
//todo: get groups
|
||||
// const groups = await NTQQGroupApi.getGroups(true)
|
||||
// log("get groups", groups)
|
||||
}
|
||||
return OB11Constructor.groups(Array.from(groups.values()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user