This commit is contained in:
Il Harper 2024-07-09 00:47:41 +08:00
parent 2a8a2855c0
commit 6748cf70c4
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC
2 changed files with 20 additions and 9 deletions

View File

@ -192,7 +192,15 @@ const responseDispatcher = async (
case 'nodeIKernelGroupListener/onGroupListUpdate': {
const { groupList } = payload as OnGroupListUpdate
for (const group of groupList) groupMap[group.groupCode] = group
for (const group of groupList) {
ctx.chronocatEngineChronocatApi.msgBoxActiv.activate({
chatType: ChatType.Group,
peerUid: group.groupCode,
guildId: '',
})
groupMap[group.groupCode] = group
}
chronoEventEmitter.emitGroupListUpdate()
@ -277,15 +285,17 @@ const responseDispatcher = async (
const { listType, changedList } = changedRecentContactList
switch (listType) {
// case ContactListType.Normal: {
// for (const contact of changedList)
// if (contact.chatType === ChatType.MsgBox)
// ctx.chronocatEngineChronocatApi.msgBoxActiv.activate(
// contact.peerUid,
// )
case ContactListType.Normal: {
for (const contact of changedList)
if (contact.chatType === ChatType.MsgBox)
ctx.chronocatEngineChronocatApi.msgBoxActiv.activate({
chatType: contact.chatType,
peerUid: contact.peerUid,
guildId: '',
})
// break
// }
break
}
case ContactListType.MsgBox: {
for (const contact of changedList)

View File

@ -1005,4 +1005,5 @@ export interface ContactList {
export enum ContactListType {
Normal = 1,
MsgBox = 2,
Value14 = 14,
}