fix: 大部分异常

This commit is contained in:
手瓜一十雪
2024-08-09 18:06:11 +08:00
parent 365f5dfb85
commit 3f49b81a4d
4 changed files with 86 additions and 58 deletions

View File

@@ -40,8 +40,8 @@ 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 = MessageUnique.createMsg({ guildId:'',chatType:msg.chatType,peerUid:msg.peerUid },msg.msgId)!;
const resMsg = await OB11Constructor.message(this.CoreContext, msg, "array");
resMsg.message_id = MessageUnique.createMsg({ guildId: '', chatType: msg.chatType, peerUid: msg.peerUid }, msg.msgId)!;
return resMsg;
}));
messages.map(msg => {

View File

@@ -46,7 +46,7 @@ export default class GoCQHTTPGetGroupMsgHistory extends BaseAction<Payload, Resp
}));
//转换消息
const ob11MsgList = await Promise.all(msgList.map(msg => OB11Constructor.message(msg)));
const ob11MsgList = await Promise.all(msgList.map(msg => OB11Constructor.message(this.CoreContext, msg, "array")));
return { 'messages': ob11MsgList };
}
}