mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-22 07:07:53 +00:00
feat: update uix add
This commit is contained in:
parent
8540f32c4b
commit
bdfc39acf9
@ -10,6 +10,7 @@ import type {
|
||||
OnMsgInfoListUpdate,
|
||||
OnOpenParamChange,
|
||||
OnProfileChanged,
|
||||
OnProfileSimpleChanged,
|
||||
OnRecentContactListChangedVer2,
|
||||
OnRecvMsg,
|
||||
OnRichMediaDownloadComplete,
|
||||
@ -111,7 +112,8 @@ const responseDispatcher = async (
|
||||
) => {
|
||||
switch (method) {
|
||||
case 'nodeIKernelMsgListener/onRecvActiveMsg':
|
||||
case 'nodeIKernelMsgListener/onRecvMsg': {
|
||||
case 'nodeIKernelMsgListener/onRecvMsg':
|
||||
case 'nodeIKernelMsgService/getAioFirstViewLatestMsgsAndAddActiveChat': {
|
||||
const { msgList } = payload as OnRecvMsg
|
||||
|
||||
for (const msg of msgList) {
|
||||
@ -169,6 +171,16 @@ const responseDispatcher = async (
|
||||
return
|
||||
}
|
||||
|
||||
case 'onProfileSimpleChanged': {
|
||||
const { profiles } = payload as OnProfileSimpleChanged
|
||||
|
||||
if (profiles)
|
||||
for (const uid in profiles)
|
||||
ctx.chronocat.uix.add(uid, profiles[uid]!.uin)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelGroupListener/onMemberInfoChange': {
|
||||
const { members } = payload as OnMemberInfoChange
|
||||
|
||||
|
@ -11,6 +11,7 @@ import type {
|
||||
OnMsgInfoListUpdate,
|
||||
OnOpenParamChange,
|
||||
OnProfileChanged,
|
||||
OnProfileSimpleChanged,
|
||||
OnRecentContactListChangedVer2,
|
||||
OnRecvMsg,
|
||||
Peer,
|
||||
@ -122,6 +123,18 @@ const dispatcher = async (
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelMsgService/getAioFirstViewLatestMsgsAndAddActiveChat': {
|
||||
const { msgList } = payload as OnRecvMsg
|
||||
|
||||
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 'nodeIKernelProfileListener/onProfileSimpleChanged':
|
||||
case 'nodeIKernelProfileListener/onProfileDetailInfoChanged':
|
||||
case 'nodeIKernelGroupListener/onSearchMemberChange':
|
||||
@ -142,6 +155,16 @@ const dispatcher = async (
|
||||
return
|
||||
}
|
||||
|
||||
case 'onProfileSimpleChanged': {
|
||||
const { profiles } = payload as OnProfileSimpleChanged
|
||||
|
||||
if (profiles)
|
||||
for (const uid in profiles)
|
||||
ctx.chronocat.uix.add(uid, profiles[uid]!.uin)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelGroupListener/onMemberInfoChange': {
|
||||
const { members } = payload as OnMemberInfoChange
|
||||
|
||||
|
@ -36,6 +36,10 @@ export interface OnProfileChanged {
|
||||
info: Profile
|
||||
}
|
||||
|
||||
export interface OnProfileSimpleChanged {
|
||||
profiles: Record<string, UserSimpleInfo>
|
||||
}
|
||||
|
||||
export interface OnMemberInfoChange {
|
||||
groupCode: string
|
||||
dataSource: number
|
||||
|
Loading…
Reference in New Issue
Block a user