mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-11 23:40:24 +00:00
refactor: #637
This commit is contained in:
@@ -19,12 +19,11 @@ export default class SetGroupAddRequest extends OneBotAction<Payload, null> {
|
||||
const flag = payload.flag.toString();
|
||||
const approve = payload.approve?.toString() !== 'false';
|
||||
const reason = payload.reason ?? ' ';
|
||||
|
||||
const notify = await this.findNotify(flag);
|
||||
let invite_notify = this.obContext.apis.MsgApi.notifyGroupInvite.get(flag);
|
||||
const notify = invite_notify ?? await this.findNotify(flag);
|
||||
if (!notify) {
|
||||
throw new Error('No such request');
|
||||
}
|
||||
|
||||
await this.core.apis.GroupApi.handleGroupRequest(
|
||||
notify,
|
||||
approve ? NTGroupRequestOperateTypes.KAGREE : NTGroupRequestOperateTypes.KREFUSE,
|
||||
|
||||
Reference in New Issue
Block a user