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