From 6e38e748b8c6657d562e424658649ac90a0bead8 Mon Sep 17 00:00:00 2001 From: Clansty Date: Mon, 14 Apr 2025 05:40:11 +0800 Subject: [PATCH] fix: isReverseOrder --- src/onebot/action/go-cqhttp/GetFriendMsgHistory.ts | 2 +- src/onebot/action/go-cqhttp/GetGroupMsgHistory.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onebot/action/go-cqhttp/GetFriendMsgHistory.ts b/src/onebot/action/go-cqhttp/GetFriendMsgHistory.ts index f8bed60d..a375296e 100644 --- a/src/onebot/action/go-cqhttp/GetFriendMsgHistory.ts +++ b/src/onebot/action/go-cqhttp/GetFriendMsgHistory.ts @@ -34,7 +34,7 @@ export default class GetFriendMsgHistory extends OneBotAction const hasMessageSeq = !payload.message_seq ? !!payload.message_seq : !(payload.message_seq?.toString() === '' || payload.message_seq?.toString() === '0'); const startMsgId = hasMessageSeq ? (MessageUnique.getMsgIdAndPeerByShortId(+payload.message_seq!)?.MsgId ?? payload.message_seq!.toString()) : '0'; const msgList = hasMessageSeq ? - (await this.core.apis.MsgApi.getMsgHistory(peer, startMsgId, +payload.count)).msgList : (await this.core.apis.MsgApi.getAioFirstViewLatestMsgs(peer, +payload.count)).msgList; + (await this.core.apis.MsgApi.getMsgHistory(peer, startMsgId, +payload.count, isReverseOrder)).msgList : (await this.core.apis.MsgApi.getAioFirstViewLatestMsgs(peer, +payload.count)).msgList; if (msgList.length === 0) throw new Error(`消息${payload.message_seq}不存在`); //翻转消息 if (isReverseOrder) msgList.reverse(); diff --git a/src/onebot/action/go-cqhttp/GetGroupMsgHistory.ts b/src/onebot/action/go-cqhttp/GetGroupMsgHistory.ts index f2eb4044..5eed6ff5 100644 --- a/src/onebot/action/go-cqhttp/GetGroupMsgHistory.ts +++ b/src/onebot/action/go-cqhttp/GetGroupMsgHistory.ts @@ -33,7 +33,7 @@ export default class GoCQHTTPGetGroupMsgHistory extends OneBotAction