This commit is contained in:
linyuchen committed 2024-04-15 00:09:08 +08:00
1 parent b2061347a5
commit 14e6c6d9a6
218 files changed
+8465 -5

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { NTQQMsgApi } from '@/core/qqnt/apis';
import { ActionName } from '../types';
import BaseAction from '../BaseAction';
import { dbUtil } from '@/common/utils/db';
import { napCatCore } from '@/core';
interface Payload {
message_id: number
}
class DeleteMsg extends BaseAction<Payload, void> {
actionName = ActionName.DeleteMsg;
protected async _handle(payload: Payload) {
const msg = await dbUtil.getMsgByShortId(payload.message_id);
if (msg) {
await NTQQMsgApi.recallMsg({ peerUid: msg.peerUid, chatType: msg.chatType }, [msg.msgId]);
}
}
}
export default DeleteMsg;