From 7732f28ca89426f4349b1fa58730f147a04f5822 Mon Sep 17 00:00:00 2001 From: Alen Date: Wed, 28 Aug 2024 22:51:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20reply=E6=B6=88=E6=81=AF=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/onebot/api/msg.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/onebot/api/msg.ts b/src/onebot/api/msg.ts index a80d3d72..3621abee 100644 --- a/src/onebot/api/msg.ts +++ b/src/onebot/api/msg.ts @@ -207,6 +207,21 @@ export class OneBotMsgApi { this.core.context.logger.logError('获取不到引用的消息', element.replayMsgSeq); return null; } + + // 合并转发直接返回 + if (records.peerUin === '284840486') { + return { + type: OB11MessageDataType.reply, + data: { + id: MessageUnique.createUniqueMsgId({ + peerUid: msg.peerUid, + guildId: '', + chatType: msg.chatType, + }, records.msgId).toString(), + }, + }; + } + let replyMsg: RawMessage | undefined; // Attempt 1 replyMsg = (await NTQQMsgApi.getMsgsBySeqAndCount({ @@ -221,7 +236,7 @@ export class OneBotMsgApi { // Attempt 2 replyMsg = (await NTQQMsgApi.getSingleMsg(peer, element.replayMsgSeq)).msgList[0]; - if ((!replyMsg || records.msgRandom !== replyMsg.msgRandom) && msg.peerUin !== '284840486') { + if (!replyMsg || records.msgRandom !== replyMsg.msgRandom) { // Attempt 3 const replyMsgList = (await NTQQMsgApi.getMsgExBySeq(peer, records.msgSeq)).msgList; if (replyMsgList.length < 1) {