mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
refactor: msgId stage-2
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { OB11ForwardMessage, OB11Message, OB11MessageData } from '../../types';
|
||||
import { NTQQMsgApi } from '@/core/apis';
|
||||
import { dbUtil } from '@/common/utils/db';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import { ActionName, BaseCheckResult } from '../types';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import Ajv from 'ajv';
|
||||
import { MessageUnique } from '@/common/utils/MessageUnique';
|
||||
|
||||
const SchemaData = {
|
||||
@@ -42,7 +40,7 @@ export class GoCQHTTPGetForwardMsgAction extends BaseAction<Payload, any> {
|
||||
const msgList = data.msgList;
|
||||
const messages = await Promise.all(msgList.map(async msg => {
|
||||
const resMsg = await OB11Constructor.message(msg);
|
||||
resMsg.message_id = await dbUtil.addMsg(msg);
|
||||
resMsg.message_id = await MessageUnique.createMsg({guildId:'',chatType:msg.chatType,peerUid:msg.peerUid},msg.msgId)!;
|
||||
return resMsg;
|
||||
}));
|
||||
messages.map(msg => {
|
||||
|
||||
Reference in New Issue
Block a user