From c36bb772869145ff328581aeabc281950ff8a2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 6 Aug 2024 14:48:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=88=E5=B9=B6=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=88=9D=E6=AD=A5=E8=A7=A3=E6=9E=90=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/src/apis/msg.ts | 5 +- src/core/src/entities/msg.ts | 6 +- .../action/go-cqhttp/GetGroupMsgHistory.ts | 2 +- src/onebot11/constructor.ts | 60 ++++++++++++------- src/onebot11/log.ts | 4 +- 5 files changed, 50 insertions(+), 27 deletions(-) diff --git a/src/core/src/apis/msg.ts b/src/core/src/apis/msg.ts index 76e2faa6..143d1a22 100644 --- a/src/core/src/apis/msg.ts +++ b/src/core/src/apis/msg.ts @@ -67,6 +67,9 @@ setTimeout(() => { // }, 25000) export class NTQQMsgApi { + static async FetchLongMsg(peer: Peer, msgId: string) { + return napCatCore.session.getMsgService().fetchLongMsg(peer, msgId); + } static async getMsgEmojiLikesList(peer: Peer, msgSeq: string, emojiId: string, emojiType: string, count: number = 20) { //console.log(peer, msgSeq, emojiId, emojiType, count); return napCatCore.session.getMsgService().getMsgEmojiLikesList(peer, msgSeq, emojiId, emojiType, "", false, 20) @@ -100,7 +103,7 @@ export class NTQQMsgApi { filterMsgFromTime: '0', isReverseOrder: false, isIncludeCurrent: true, - pageLimit: 1, + pageLimit: count, }); return ret; } diff --git a/src/core/src/entities/msg.ts b/src/core/src/entities/msg.ts index d450931b..3f5d1ab8 100644 --- a/src/core/src/entities/msg.ts +++ b/src/core/src/entities/msg.ts @@ -731,10 +731,12 @@ export interface MultiForwardMsgElement { } export interface RawMessage { + parentMsgPeer: Peer; + parentMsgIdList:string[]; + id?: number;//扩展字段 用于处理OB11 ID guildId: string; msgRandom: string; - // int32, 自己维护的消息id - id?: number; + msgId: string; diff --git a/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts b/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts index 15f06947..15f1aa61 100644 --- a/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts +++ b/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts @@ -37,7 +37,7 @@ export default class GoCQHTTPGetGroupMsgHistory extends BaseAction