mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: 再次优化nodeid
This commit is contained in:
parent
c647771a6d
commit
7cb85ed73c
@ -94,6 +94,9 @@ export class NTQQMsgApi {
|
||||
} | undefined> {
|
||||
return napCatCore.session.getMsgService().getMultiMsg(peer, rootMsgId, parentMsgId);
|
||||
}
|
||||
static async ForwardMsg(peer: Peer, msgIds: string[]) {
|
||||
return napCatCore.session.getMsgService().forwardMsg(msgIds, peer, [peer], new Map());
|
||||
}
|
||||
static async getLastestMsgByUids(peer: Peer, count: number = 20) {
|
||||
let ret = await napCatCore.session.getMsgService().queryMsgsWithFilterEx('0', '0', '0', {
|
||||
chatInfo: peer,
|
||||
|
@ -52,10 +52,15 @@ export async function handleForwardNode(destPeer: Peer, messageNodes: OB11Messag
|
||||
// 一个node表示一个人的消息
|
||||
const nodeId = messageNode.data.id;
|
||||
// 有nodeId表示一个子转发消息卡片
|
||||
// 建议改成自带 forward 而不是 clone再发
|
||||
if (nodeId) {
|
||||
const nodeMsg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(nodeId));
|
||||
const nodeMsg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(nodeId)) || MessageUnique.getPeerByMsgId(nodeId);
|
||||
if (!nodeMsg) {
|
||||
logError('转发消息失败,未找到消息', nodeId);
|
||||
continue;
|
||||
}
|
||||
if (!needClone) {
|
||||
nodeMsgIds.push(nodeMsg!.MsgId);
|
||||
nodeMsgIds.push(nodeMsg.MsgId);
|
||||
} else {
|
||||
if (nodeMsg!.Peer.peerUid !== selfInfo.uid) {
|
||||
// need cloning
|
||||
|
Loading…
x
Reference in New Issue
Block a user