mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: report self sent message_id
This commit is contained in:
@@ -137,12 +137,8 @@ registerReceiveHook<{ msgList: Array<RawMessage> }>(ReceiveCmd.UPDATE_MSG, (payl
|
||||
|
||||
registerReceiveHook<{ msgList: Array<RawMessage> }>(ReceiveCmd.NEW_MSG, (payload) => {
|
||||
for (const message of payload.msgList) {
|
||||
log("收到新消息,push到历史记录", message)
|
||||
if (!msgHistory[message.msgId]) {
|
||||
addHistoryMsg(message)
|
||||
} else {
|
||||
Object.assign(msgHistory[message.msgId], message)
|
||||
}
|
||||
// log("收到新消息,push到历史记录", message)
|
||||
addHistoryMsg(message)
|
||||
}
|
||||
const msgIds = Object.keys(msgHistory);
|
||||
if (msgIds.length > 30000) {
|
||||
|
Reference in New Issue
Block a user