refactor: 精简逻辑

This commit is contained in:
手瓜一十雪
2024-07-29 10:12:41 +08:00
parent 1f1cdec3a0
commit 53b0ea5c0d
2 changed files with 4 additions and 12 deletions

View File

@@ -150,16 +150,8 @@ export class OB11Constructor {
guildId: '',
};
let replyMsg: RawMessage | undefined;
replyMsg = (await NTQQMsgApi.getMsgsBySeqAndCount({ peerUid: msg.peerUid, guildId: '', chatType: msg.chatType }, element.replyElement.replayMsgSeq, 1, true, true)).msgList[0];
if (!replyMsg || element.replyElement.replayMsgSeq !== replyMsg.msgSeq) {
replyMsg = (await NTQQMsgApi.queryMsgsWithFilterExWithSeq(
peer,
element.replyElement.replayMsgSeq,
'0',
'0'
)).msgList[0];
}
if (!replyMsg || element.replyElement.replayMsgSeq !== replyMsg.msgSeq) {
replyMsg = (await NTQQMsgApi.getSingleMsg(peer, element.replyElement.replayMsgSeq)).msgList[0];
}