feat: update uix add

This commit is contained in:
Il Harper 2024-03-16 23:48:05 +08:00
parent 0c8919a0db
commit 1ad562e136
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC
2 changed files with 13 additions and 0 deletions

View File

@ -204,6 +204,13 @@ const dispatcher = async (
case 'nodeIKernelMsgListener/onMsgInfoListUpdate': { case 'nodeIKernelMsgListener/onMsgInfoListUpdate': {
const { msgList } = payload as OnMsgInfoListUpdate const { msgList } = payload as OnMsgInfoListUpdate
for (const msg of msgList) {
ctx.chronocat.uix.add(msg.senderUid, msg.senderUin)
if (msg.chatType === ChatType.Private)
ctx.chronocat.uix.add(msg.peerUid, msg.peerUin)
}
for (const msg of msgList) { for (const msg of msgList) {
if (msg.sendStatus > 1) { if (msg.sendStatus > 1) {
sendCallbackMap[msg.msgId]?.(msg) sendCallbackMap[msg.msgId]?.(msg)

View File

@ -218,6 +218,12 @@ const dispatcher = async (
case 'nodeIKernelMsgListener/onMsgInfoListUpdate': { case 'nodeIKernelMsgListener/onMsgInfoListUpdate': {
const { msgList } = payload as OnMsgInfoListUpdate const { msgList } = payload as OnMsgInfoListUpdate
for (const msg of msgList) {
ctx.chronocat.uix.add(msg.senderUid, msg.senderUin)
if (msg.chatType === ChatType.Private)
ctx.chronocat.uix.add(msg.peerUid, msg.peerUin)
}
const filteredPayload = await Promise.all( const filteredPayload = await Promise.all(
msgList msgList
.filter( .filter(