mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-21 22:58:10 +00:00
fix(api): fix chrononeko/bugtracker#72
This commit is contained in:
parent
2a8a2855c0
commit
6748cf70c4
@ -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)
|
||||
|
@ -1005,4 +1005,5 @@ export interface ContactList {
|
||||
export enum ContactListType {
|
||||
Normal = 1,
|
||||
MsgBox = 2,
|
||||
Value14 = 14,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user