revert: 还原 ob11 风格 get_forward_msg

This commit is contained in:
Clansty committed 2024-11-03 09:44:35 +08:00
1 parent 7c45f74df0
commit 46764a804f
1 file changed
+4 -6
+4 -6
View File
@@ -73,14 +73,12 @@ export class GoCQHTTPGetForwardMsgAction extends BaseAction<Payload, any> {
const singleMsg = data.msgList[0]; const singleMsg = data.msgList[0];
const resMsg = await this.obContext.apis.MsgApi.parseMessage(singleMsg, 'array');//强制array 以便处理 const resMsg = await this.obContext.apis.MsgApi.parseMessage(singleMsg, 'array');//强制array 以便处理
if (!resMsg) { if (!(resMsg?.message?.[0] as OB11MessageForward)?.data?.content) {
throw new Error('找不到相关的聊天记录'); throw new Error('找不到相关的聊天记录');
} }
//if (this.obContext.configLoader.configData.messagePostFormat === 'array') { return {
//提取 messages: (resMsg?.message?.[0] as OB11MessageForward)?.data?.content
const realmsg = ((await this.parseForward([resMsg]))[0].data.message as OB11MessageNode[])[0].data.message; };
//里面都是offline消息 id都是0 没得说话
return { message: realmsg };
//} //}
// return { message: resMsg }; // return { message: resMsg };