NapCatQQ
This commit is contained in:
1 parent
0ef3e38d70
commit
356aba762c
218 files changed
+8465
-5
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQFriendApi } from '@/core/qqnt/apis/friend';
|
||||
import { friendRequests } from '@/common/data';
|
||||
|
||||
interface Payload {
|
||||
flag: string,
|
||||
approve: boolean,
|
||||
remark?: string,
|
||||
}
|
||||
|
||||
export default class SetFriendAddRequest extends BaseAction<Payload, null> {
|
||||
actionName = ActionName.SetFriendAddRequest;
|
||||
|
||||
protected async _handle(payload: Payload): Promise<null> {
|
||||
const approve = payload.approve.toString() === 'true';
|
||||
const request = friendRequests[payload.flag];
|
||||
await NTQQFriendApi.handleFriendRequest(request, approve);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user