mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: reply消息转换
This commit is contained in:
parent
7f9da8cc2d
commit
7732f28ca8
@ -207,6 +207,21 @@ export class OneBotMsgApi {
|
|||||||
this.core.context.logger.logError('获取不到引用的消息', element.replayMsgSeq);
|
this.core.context.logger.logError('获取不到引用的消息', element.replayMsgSeq);
|
||||||
return null;
|
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;
|
let replyMsg: RawMessage | undefined;
|
||||||
// Attempt 1
|
// Attempt 1
|
||||||
replyMsg = (await NTQQMsgApi.getMsgsBySeqAndCount({
|
replyMsg = (await NTQQMsgApi.getMsgsBySeqAndCount({
|
||||||
@ -221,7 +236,7 @@ export class OneBotMsgApi {
|
|||||||
// Attempt 2
|
// Attempt 2
|
||||||
replyMsg = (await NTQQMsgApi.getSingleMsg(peer, element.replayMsgSeq)).msgList[0];
|
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
|
// Attempt 3
|
||||||
const replyMsgList = (await NTQQMsgApi.getMsgExBySeq(peer, records.msgSeq)).msgList;
|
const replyMsgList = (await NTQQMsgApi.getMsgExBySeq(peer, records.msgSeq)).msgList;
|
||||||
if (replyMsgList.length < 1) {
|
if (replyMsgList.length < 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user