fix: reply msg id

This commit is contained in:
linyuchen
2024-03-07 14:18:24 +08:00
parent ac417cedd3
commit 55d046b4f9
14 changed files with 117 additions and 183 deletions

View File

@@ -233,7 +233,7 @@ registerReceiveHook<{
registerReceiveHook<{ msgList: RawMessage[] }>(ReceiveCmd.NEW_MSG, (payload) => {
const {autoDeleteFile, autoDeleteFileSecond} = getConfigUtil().getConfig()
for (const message of payload.msgList) {
// log("收到新消息push到历史记录", message)
// log("收到新消息push到历史记录", message.msgSeq)
dbUtil.addMsg(message).then()
// 清理文件
if (!autoDeleteFile) {
@@ -268,6 +268,8 @@ registerReceiveHook<{ msgRecord: RawMessage }>(ReceiveCmd.SELF_SEND_MSG, ({msgRe
const message = msgRecord
const peerUid = message.peerUid
// log("收到自己发送成功的消息", Object.keys(sendMessagePool), message);
// log("收到自己发送成功的消息", message.msgSeq);
dbUtil.addMsg(message).then()
const sendCallback = sendMessagePool[peerUid]
if (sendCallback) {
try {

View File

@@ -422,7 +422,7 @@ export class NTQQApi {
})
}
static async sendMsg(peer: Peer, msgElements: SendMessageElement[], waitComplete = false, timeout = 10000) {
static async sendMsg(peer: Peer, msgElements: SendMessageElement[], waitComplete = true, timeout = 10000) {
const peerUid = peer.peerUid
// 等待上一个相同的peer发送完