refactor(event): remove unused friendMap

This commit is contained in:
Il Harper 2024-09-16 02:25:37 +08:00
parent fe48309be0
commit 4005d8ccb7
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC
2 changed files with 3 additions and 10 deletions

View File

@ -1,4 +1,4 @@
import type { Group, Profile } from '@chronocat/red' import type { Group } from '@chronocat/red'
export const requestMethodMap: Record<string, string> = {} export const requestMethodMap: Record<string, string> = {}
export const emittedBuddyReqList: string[] = [] export const emittedBuddyReqList: string[] = []
@ -9,4 +9,3 @@ export const emittedGuildMemberRemovedList: string[] = []
export const sendQueue: string[] = [] export const sendQueue: string[] = []
export const groupMap: Record<string, Group> = {} export const groupMap: Record<string, Group> = {}
export const friendMap: Record<string, Profile> = {}

View File

@ -26,7 +26,6 @@ import {
emittedGuildMemberRemovedList, emittedGuildMemberRemovedList,
emittedGuildMemberRequestList, emittedGuildMemberRequestList,
emittedGuildRequestList, emittedGuildRequestList,
friendMap,
groupMap, groupMap,
requestMethodMap, requestMethodMap,
sendQueue, sendQueue,
@ -297,15 +296,10 @@ const dispatcher = async (
case 'nodeIKernelBuddyListener/onBuddyListChange': { case 'nodeIKernelBuddyListener/onBuddyListChange': {
const { data } = payload as OnBuddyListChange const { data } = payload as OnBuddyListChange
for (const category of data) { for (const category of data)
for (const buddy of category.buddyList) { for (const buddy of category.buddyList)
ctx.chronocat.uix.add(buddy.uid, buddy.uin) ctx.chronocat.uix.add(buddy.uid, buddy.uin)
// buddy.category = category.categoryName
friendMap[buddy.uin] = buddy
}
}
return return
} }