diff --git a/src/core/apis/msg.ts b/src/core/apis/msg.ts index 0ad0358d..66737612 100644 --- a/src/core/apis/msg.ts +++ b/src/core/apis/msg.ts @@ -94,6 +94,7 @@ export class NTQQMsgApi { pageLimit: 1, }); } + //@deprecated async getMsgsBySeqAndCount(peer: Peer, seq: string, count: number, desc: boolean, z: boolean) { return await this.context.session.getMsgService().getMsgsBySeqAndCount(peer, seq, count, desc, z); } diff --git a/src/core/entities/msg.ts b/src/core/entities/msg.ts index f136cc0b..7e21f807 100644 --- a/src/core/entities/msg.ts +++ b/src/core/entities/msg.ts @@ -959,3 +959,18 @@ export interface TmpChatInfo { sessionType: number; sig: string; } +export interface MsgReqType { + peer: Peer, + byType: number, + msgId: string, + msgSeq: string, + msgTime: string, + clientSeq: string, + cnt: number, + queryOrder: boolean, + includeSelf: boolean, + includeDeleteMsg: boolean, + extraCnt: number +} +//getMsgsIncludeSelf Peer必须 byType 1 +//getMsgsWithMsgTimeAndClientSeqForC2C Peer必须 byType 3 \ No newline at end of file diff --git a/src/core/services/NodeIKernelMsgService.ts b/src/core/services/NodeIKernelMsgService.ts index a0498f62..ee7b6ef3 100644 --- a/src/core/services/NodeIKernelMsgService.ts +++ b/src/core/services/NodeIKernelMsgService.ts @@ -1,7 +1,7 @@ import { ElementType, MessageElement, Peer, RawMessage, SendMessageElement } from '@/core/entities'; import { NodeIKernelMsgListener } from '@/core/listeners/NodeIKernelMsgListener'; import { GeneralCallResult } from '@/core/services/common'; -import { QueryMsgsParams, TmpChatInfoApi } from '../entities/msg'; +import { MsgReqType, QueryMsgsParams, TmpChatInfoApi } from '../entities/msg'; export interface NodeIKernelMsgService { @@ -147,12 +147,14 @@ export interface NodeIKernelMsgService { msgList: RawMessage[] }>; + //@deprecated getMsgs(peer: Peer, msgId: string, count: unknown, queryOrder: boolean): Promise; + //@deprecated getMsgsIncludeSelf(peer: Peer, msgId: string, count: number, queryOrder: boolean): Promise; - + //@deprecated getMsgsWithMsgTimeAndClientSeqForC2C(...args: unknown[]): Promise; getMsgsWithStatus(params: { @@ -168,7 +170,7 @@ export interface NodeIKernelMsgService { getMsgsBySeqRange(peer: Peer, startSeq: string, endSeq: string): Promise; - + //@deprecated getMsgsBySeqAndCount(peer: Peer, seq: string, count: number, desc: boolean, unknownArg: boolean): Promise; @@ -179,6 +181,8 @@ export interface NodeIKernelMsgService { getMsgsBySeqList(peer: Peer, seqList: string[]): Promise; + getMsgsExt(msgReq: MsgReqType): Promise; + getSingleMsg(Peer: Peer, msgSeq: string): Promise; getSourceOfReplyMsg(peer: Peer, MsgId: string, SourceSeq: string): unknown; @@ -318,7 +322,7 @@ export interface NodeIKernelMsgService { getFileThumbSavePath(...args: unknown[]): unknown; - translatePtt2Text(msgId: string, peer: Peer, msgElement: unknown): unknown; + translatePtt2Text(msgId: string, peer: Peer, msgElement: MessageElement): unknown; setPttPlayedState(...args: unknown[]): unknown; @@ -518,7 +522,7 @@ export interface NodeIKernelMsgService { canImportOldDbMsg(...args: unknown[]): unknown; - setPowerStatus(z: boolean): unknown; + setPowerStatus(isPowerOn: boolean): unknown; canProcessDataMigration(...args: unknown[]): unknown;