mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-22 07:07:53 +00:00
feat: implement uix add
This commit is contained in:
parent
129fde4994
commit
692f034e93
@ -1,4 +1,5 @@
|
||||
import type {
|
||||
MsgsIncludeSelf,
|
||||
OnAddSendMsg,
|
||||
OnBuddyListChange,
|
||||
OnGroupListUpdate,
|
||||
@ -127,6 +128,18 @@ export const apply = async (ctx: ChronocatContext) => {
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelMsgService/getMsgsIncludeSelf': {
|
||||
const { msgList } = payload as MsgsIncludeSelf
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelRecentContactListener/onRecentContactListChangedVer2': {
|
||||
const { changedRecentContactLists } =
|
||||
payload as OnRecentContactListChangedVer2
|
||||
|
@ -1,5 +1,6 @@
|
||||
import type {
|
||||
Element,
|
||||
MsgsIncludeSelf,
|
||||
OnBuddyListChange,
|
||||
OnBuddyReqChange,
|
||||
OnMemberInfoChange,
|
||||
@ -133,6 +134,18 @@ export const apply = async (ctx: ChronocatContext) => {
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelMsgService/getMsgsIncludeSelf': {
|
||||
const { msgList } = payload as MsgsIncludeSelf
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
case 'onBuddyListChange':
|
||||
case 'nodeIKernelBuddyListener/onBuddyListChange': {
|
||||
const { data } = payload as OnBuddyListChange
|
||||
|
Loading…
Reference in New Issue
Block a user