mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-11 15:30:25 +00:00
chore: 解耦
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { OB11Message } from '../../types';
|
||||
import { OB11Constructor } from '../../helper/data';
|
||||
import { OB11Constructor } from '@/onebot/helper/converter';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import { MessageUnique } from '@/common/utils/MessageUnique';
|
||||
import { RawNTMsg2Onebot } from '@/onebot/helper';
|
||||
|
||||
|
||||
export type ReturnDataType = OB11Message
|
||||
@@ -37,7 +38,7 @@ class GetMsg extends BaseAction<Payload, OB11Message> {
|
||||
const msg = await NTQQMsgApi.getMsgsByMsgId(
|
||||
peer,
|
||||
[msgIdWithPeer?.MsgId || payload.message_id.toString()]);
|
||||
const retMsg = await OB11Constructor.message(this.CoreContext, this.OneBotContext, msg.msgList[0], 'array');
|
||||
const retMsg = await RawNTMsg2Onebot(this.CoreContext, this.OneBotContext, msg.msgList[0], 'array');
|
||||
if (!retMsg) throw Error('消息为空');
|
||||
try {
|
||||
retMsg.message_id = MessageUnique.createMsg(peer, msg.msgList[0].msgId)!;
|
||||
|
||||
Reference in New Issue
Block a user